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.

2
  • try again after composer dump-autoload Commented Aug 29, 2021 at 15:42
  • Try this : therichpost.com/… Commented Aug 29, 2021 at 15:49

4 Answers 4

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.

Sign up to request clarification or add additional context in comments.

1 Comment

I tried this, and work for me. Thank you, I really appreciate it
4

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

Comments

1

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

composer require laravel/fortify

The details can be found here.

Comments

1

Why dont you use Laravel Sanctum

composer require laravel/sanctum

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.