Laravel 6 came with a hero's welcome this Tuesday. When I started to try to see how the new one is, I was straight away hit at a wall.
php artisan make:auth
Make Auth command is not anymore available in Laravel 6. But, don't worry. we are covered with a better solution for this.
New package - Laravel UI
Laravel has come up with a new package - Laravel UI which separates UI part of an application apart. This could help developers to create a server only applicaiton (API host) or a Console only application, without having the extra burden of UI attached to it.
Laravel UI can be installed with composer command:
composer create-project laravel/laravel blog cd blog composer require laravel/ui
Once this package is installed successfully, it gives a few new artisan commands.
➜ php artisan ui --help Description: Swap the front-end scaffolding for the application Usage: ui [options] [--] <type> Arguments: type The preset type (bootstrap, vue, react) Options: --auth Install authentication UI scaffolding --option[=OPTION] Pass an option to the preset command (multiple values allowed) -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
UI can be initiated with either VueJS or with React.
php artisan ui vue php artisan ui react
For creating authentication scaffolds, add --auth to the ui command.
php artisan ui:auth php artisan ui:auth --views
Running the first command sets up the routes and scaffolds for authentication and second one sets up the views.
Fun time's up! Let us get back to work...!