Usually, in all other MVC frameworks, we do not have an authentication module or any package available. But luckily laravel offer authentication functionality of the package. Which save allot of time
and it is quite useful to use.
Step 1: Install Laravel
Before you dive into the installation of the Laravel Auth package, ensure you have Laravel installed on your system. If not, you can install it by running the following command in your terminal:composer create-project --prefer-dist laravel/laravel yourProjectName
Step 2: Install Laravel UI
Laravel UI is a separate package that provides the UI essentials for your authentication system. Install it using Composer with the following command:composer require laravel/ui
Step 3: Generate Auth Scaffolding
Once Laravel UI is installed, you can easily generate the auth scaffolding by running one of the following commands, depending on your preference for the front-end:
For Bootstrap
php artisan ui bootstrap --auth
Step 4: Migrate the Database
php artisan migrate
After running the migration all database tables will get created. Moreover all login, register
routes will be available for use
Navigate your browser to
http://website.com/register
http://website.com/login
For further details see Auth Facade
Navigate your browser to
http://website.com/register
http://website.com/login
For further details see Auth Facade
No comments:
Post a Comment