Sign Up
You can register as a user by filling in the name, email and password for your account.
You can do this by accessing the sign up page from the Sign Up button in the top navbar or by clicking the Sign Up button from the bottom of the log in form or if you are logged in from the Sign Up button from the sidebar. Another simple way is adding /sign-up
in the url.
The App/Http/Controllers/RegisterController.php
handles the registration of a new user.
public function store(){
$attributes = request()->validate([
'name' => 'required|max:255|unique:users,name',
'email' => 'required|email|max:255|unique:users,email',
'password' => 'required|min:5|max:255',
]);
$user = User::create($attributes);
auth()->login($user);
return redirect('/dashboard');
}
The data entered by the user are checked before being added in the database and creating an account.