Laravel 6 and 7 Authentication
Laravel simplifies authentication implementation, providing robust, out-of-the-box support for common authentication tasks. Laravel 6 introduced Laravel UI, a separate package, to manage authentication scaffolding, whereas Laravel 7 continued to refine these features, ensuring a smoother developer experience.Moreover make:auth command no longer exists in Laravel 6 and Laravel 7.So if we want to use laravel auth in laravel 6/7 applications then we need to use the Laravel UI package(laravel/ui).
1) Install Laravel UI (For laravel 6)
composer require laravel/ui
php artisan ui --help
ui:auth Command
To generate authentication views we need to run following artisan command.
php artisan ui:auth
It will generate
- HomeController
- auth routes
- auth views( registration, forgot password, login, reset password views )
- app.blade.php
To generate only views in your existing application then you need to add --views.
For example:
php artisan ui:auth --views
For further details please visit official documentation:
No comments:
Post a Comment