Laravel already provides many in packages for authentication and it’s scaffolding. Few of them are like laravel/ui, breeze, jetstream etc.
Inside this article we will see the concept of creating custom login and registration in laravel 8. This will be the super easy article to understand. Inside custom login and registration process, if you which you can add more fields in any of the form. You can control the overall flow of login and registration process of user.
It covers each section in a very clear way. We need few routes, a controller, view auth scaffolding files. That’s all.
Let’s get started.
By using composer
Alternatively, we can also install Laravel by Composer command create-project. If your system doesn’t has Composer Installed, Click here to Install Composer ? Here is the complete command to create a laravel project-
$ composer create-project --prefer-dist laravel/laravel blog
After following these steps we can install a Laravel 8 application into system. To start the development server of Laravel –
$ php artisan serve
This command outputs –
Starting Laravel development server: http://127.0.0.1:8000
Create Database & Connect
To create a database, either we can create via Manual tool of PhpMyadmin or by means of a mysql command.
CREATE DATABASE laravel_app;
To connect database with application, Open .env file from application root. Search for DB_ and update your details.
When we install laravel we will have 3 default migrations inside /database/migrations folder. From these migration we have one migration for users table.
Open project into terminal and run this artisan command.
$ php artisan migrate
It will create 3 tables inside database.