I tried running this command in Laravel 5.2 but it doesn't work:
php artisan make:auth
And prompt these statements:
[InvalidArgumentException] Command "make:auth" is not defined Did you mean one of these? make:test make:request make:migration make:seeder make:middleware make:controller make:provider make:policy make:event make:console make:job make:lis tener make:model make:command
P粉7291982072024-01-22 14:01:32
Laravel 8 Update
laravel/ui
Still works, but is considered legacy. Consider using Laravel Breeze or Laravel Jetstream.
Laravel 6 Update
Now that Laravel 6 is released, you need to install laravel/ui代码>.
composer require laravel/ui --dev php artisan ui vue --auth
If you are using React or Bootstrap in your project, you can change vue
to react
or bootstrap
(see Using React).
Then you need to perform migrations and compile the frontend
php artisan migrate npm install && npm run dev
Source: Laravel Authentication Documentation
NOTE: Use the default User model and the Eloquent authentication driver only if you want to use scaffolding.
P粉4125335252024-01-22 12:39:20
For Laravel >=6
composer require laravel/ui php artisan ui vue --auth php artisan migrate
Reference: Laravel Authentication Documentation
Looks like you are not using Laravel 5.2, these are the make commands available in L5.2, you are missing more than just the make:auth command
make:auth Scaffold basic login and registration views and routes make:console Create a new Artisan command make:controller Create a new controller class make:entity Create a new entity. make:event Create a new event class make:job Create a new job class make:listener Create a new event listener class make:middleware Create a new middleware class make:migration Create a new migration file make:model Create a new Eloquent model class make:policy Create a new policy class make:presenter Create a new presenter. make:provider Create a new service provider class make:repository Create a new repository. make:request Create a new form request class make:seeder Create a new seeder class make:test Create a new test class make:transformer Create a new transformer.
Make sure you have this dependency in your composer.json file
"laravel/framework": "5.2.*",
Then run
composer update