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
/register
in the url.
The
App\Http\Controllers\Auth\RegisterController.php
handles the registration of a new user.
$user = User::create($attributes);
auth()->login($user);
The data entered by the user are checked before being added in the database and creating an account.
$attributes = request()->validate([ 'username' => 'required|max:255|min:2', 'email' => 'required|email|max:255|unique:users,email', 'password' => 'required|min:5|max:255', 'terms' => 'required' ]);