By default, laravel comes with 2 authentication controllers: Auth Controller and Password Controller.
Auth Controller, handles new registrations and authentication, Password Controller, manages forgotten passwords.
Default routes for authentication are,
So when we go to localhost:8000/auth/login , login form appears, of course we have place our view files in resources directory, in previous versions of laravel, it shipped with these view files too.
We are not going to use these, as we completely customize our authentication.We ‘ll use modal for SignIn/SignUp as modals are very popular these days and very fancy too.
Firstly, lets create a modal, we are using w3css here,
In resources/views location, create a new file named customAuthentication.blade.php, as we said we use w3css modal along with w3css tabs for login and register.
above line of code calls the modal when SignIn/SignUp is clicked,
and the code for modal is,
Now, when we fill the signup form, it is sent to register controller, there we store the user details in the users table, here we use the default table users came along with laravel installation.
After registration, we will be able to login,
Logout functionality is done flushing session, and calling Auth::logout function,
and routes file will look like,
See the output in screenshots below,