Command "make:auth" is not defined laravel 6 [duplicate]
Asked Answered
B

4

8

I am using Laravel 6.2.0 and command make:auth is not defined in my terminal. Is there any solution to that? Noted that Composer has already been updated.

Build answered 14/10, 2019 at 6:1 Comment(2)
php artisan make:authSeineetmarne
Please use this command "php artisan ui vue --auth", because laravel 6 remove php artisan make:auth command.Monohydroxy
S
19

In the Laravel 6 application that the make:auth command no longer exists.

Laravel UI is a new first-party package that extracts the UI portion of a Laravel project into a separate laravel/ui package. The separate package enables the Laravel team to iterate on the UI package separately from the main Laravel codebase.

You can install the laravel/ui package via composer:

composer require laravel/ui

The ui:auth Command

Besides the new ui command, the laravel/ui package comes with another command for generating the auth scaffolding:

php artisan ui:auth

If you run the ui:auth command, it will generate the auth routes, HomeController, auth views, and app.blade.php layout file as like make:auth


If you want to generate the views alone, type the following command instead:

php artisan ui:auth --views

If you want to make auth in react and vue js you may use this commands.

php artisan ui vue --auth
php artisan ui react --auth

php artisan ui vue --auth command will create all of the views you need for authentication and place them in the resources/views/auth directory

The ui command will also create a resources/views/layouts directory containing a base layout for your application. All of these views use the Bootstrap CSS framework, but you are free to customize them however you wish.

More detail follow. laravel-news & documentation

Simply you've to follow this two-step.

composer require laravel/ui "^1.2"
php artisan ui:auth
Stertor answered 14/10, 2019 at 6:10 Comment(0)
P
1

php artisan make:auth Laravel 6 has removed make:auth command and authentication scaffolding has been moved as a separate package named laravel/ui

The command to implement Auth is as follows:

composer require laravel/ui
php artisan ui vue --auth

This command will install a layout view, registration and login views, as well as routes for all authentication end-points. A HomeController will also be generated

Here you can read about Laravel 6 and laravel/ui and also here you can read about laravel/ui in laravel documentation

Pringle answered 14/10, 2019 at 7:58 Comment(0)
C
0

Make:auth command has been removed from laravel 6.x . Instead you should use vue auth in laravel 6.x version .

Check this link for more information .

Laravel auth in 6.x

Capitulary answered 14/10, 2019 at 6:9 Comment(0)
B
0

If you're using reactjs for your ui $ composer require laravel/ui $ php artisan ui react --auth $ npm install && npm run dev $ php artisan serve

Blasted answered 17/10, 2019 at 11:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.