0

I'm trying to run this command in Laravel 8.57.0 but it's not working:

PHP artisan make:auth

and the error is :

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:listener
      make:model
      make:command

I also tried

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

but still have the same error. So, I guess that either I am using the wrong command or I am trying to do something that can not be done.
Maybe most likely experienced people will see right away what is wrong.

blue pine
  • 472
  • 6
  • 17
Iseca
  • 55
  • 1
  • 6

4 Answers4

5

What are you trying to do exactly? Create the authentication scaffolding from the laravel/ui package?

If so, then these two commands should be enough:

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

You can read further about it here.

Cosmin
  • 864
  • 3
  • 16
  • 34
3

Since Laravel >= 6, the command php artisan make:auth was removed from the core and moved to an individual package called laravel/ui, so the command now looks like: php artisan ui vue --auth.

Depending on what you want to accomplish I can recommend you the following solutions:

  1. Check this answer, this may be marked as duplicated: php artisan make:auth command is not defined
  2. Run composer dump-autoload and php artisan optimize
  3. Try a different package, like Laravel Fortify
kingbeencent
  • 1,151
  • 11
  • 10
1

Why don't you try using the fortify package for authentication?

composer require laravel/fortify

The details can be found here.

1

Why dont you use Laravel Sanctum

composer require laravel/sanctum

Umer Fayyaz
  • 357
  • 3
  • 12