3

When I am trying to run this command php artisan make:auth... The following error comes. Is there any way to run this command, or any alternative for this command, should I Install amy package for this command?

      Command "make:auth" is not defined.
    
      Did you mean one of these?
          make:cast
          make:channel
          make:command
          make:component
          make:controller
          make:event
          make:exception
          make:factory
          make:job
          make:listener
          make:mail
          make:middleware
          make:migration
          make:model
          make:notification
          make:observer
          make:policy
          make:provider
          make:request
          make:resource
          make:rule
          make:scope
          make:seeder
          make:test

Laravel Framework 9.8.1

4 Answers 4

9

After Installing Laravel 9 you need to install laravel/ui package in order to generate authentication in laravel 9.

composer require laravel/ui

And than choose one of these

php artisan ui bootstrap --auth
php artisan ui vue --auth
php artisan ui react --auth
Sign up to request clarification or add additional context in comments.

4 Comments

I am a beginner, I did some work on just bootstrap. Which one should I choose?
you can choose: php artisan ui bootstrap --auth
habibi I have installed both of them successfully, but still facing the same issue, php artisan make:auth not defined
my command didn't run but it installed automatically
3

After Installing Laravel 9/10 you need to install laravel/ui package in order to generate authentication in laravel 9/10:

composer require laravel/ui

So after that you have give one of following package. It will depend on your framework familiar with:

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

Further, run bellow command for install npm:

npm install && npm run dev

Next run migration command:

php artisan migrate

All the required steps have been done, now you have to type the given below command and hit enter to run the Laravel app:

php artisan serve

Now, Go to your web browser, type the given URL and view the app output:

  • http://localhost:8000/

Comments

1

php artisan ui:auth. it worked for me. you can see it below commands.


Command "make:auth" is not defined.  
Did you mean one of these?
make:cast
make:channel
make:command
make:component
make:controller
make:event
make:exception
make:factory
make:job</p>
make:listener</p>
make:mail</p>
make:middleware
make:migration
make:model
make:notification
make:observer
make:policy
make:provider
make:request
make:resource
make:rule
make:seeder
make:test
ui:auth

If you didn't get style in auth pages use below link in tha layouts>path file

link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">

1 Comment

This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review
0

Omer YILMAZ is right BUT!

It order to finish the UI installation proccess, you will need to install the right version of vite and nodejs.

Because Laravel 9 require vite3+ and vite require nodejs 14+ version

My case: WSL2 on ubuntu 20.04 i was needed to install

  1. install nvm (to use different versions of nodejs)
  2. install nodejs (16 is fine)
  3. and only then, i was able to run successfully the command: npm install && npm run dev as needed.

I hope it helps

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.