Answer the question
In order to leave comments, you need to log in
How to do registration in laravel 5?
I did everything according to the documentation. Through migrations, I added the user table to the database.
Added to routes. Added register.blade.php
But for some reason the data is not added to the database. What is the problem?
register.blade.php
<!-- resources/views/auth/register.blade.php -->
<form method="POST" action="/auth/register">
{!! csrf_field() !!}
<div>
Name
<input type="text" name="name" value="{{ old('name') }}">
</div>
<div>
Email
<input type="email" name="email" value="{{ old('email') }}">
</div>
<div>
Password
<input type="password" name="password">
</div>
<div>
Confirm Password
<input type="password" name="password_confirmation">
</div>
<div>
<button type="submit">Register</button>
</div>
</form>
// Registration routes...
Route::get('auth/register', 'Auth\[email protected]');
Route::post('auth/register', 'Auth\[email protected]');
Answer the question
In order to leave comments, you need to log in
In laravel, registration works out of the box.
If it doesn't work for you, then you did something wrong.
Go through the Sample Registration Form here , are all the fields named the same?
Does registration.blade.php have error output?
Need more info, code + view.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question