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
Stranger
  • 31
  • 1
  • 1
  • 3

4 Answers4

7

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
Omer YILMAZ
  • 1,234
  • 1
  • 7
  • 15
2

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/
allexiusw
  • 1,533
  • 2
  • 16
  • 23
Ima
  • 31
  • 2
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">
Localhousee
  • 887
  • 1
  • 5
  • 17
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/32158816) – Rohit Gupta Jul 07 '22 at 00:22
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

qant
  • 183
  • 1
  • 2
  • 11