Php artisan make:auth command is not defined

后端 未结 8 1472
耶瑟儿~
耶瑟儿~ 2020-12-04 09:17

I am trying to run this command in laravel 5.2 but it\'s not working.

php artisan make:auth 

and prompts with these statements.

<         


        
相关标签:
8条回答
  • 2020-12-04 10:21

    This two commands work for me in my project

    composer require laravel/ui --dev
    

    Then

    php artisan ui:auth
    
    0 讨论(0)
  • 2020-12-04 10:23

    In the Laravel 6 application the make:auth command no longer exists.

    Laravel UI is a new first-party package that extracts the UI portion of a Laravel project into a separate laravel/ui package. The separate package enables the Laravel team to iterate on the UI package separately from the main Laravel codebase.

    You can install the laravel/ui package via composer:

    composer require laravel/ui
    

    The ui:auth Command

    Besides the new ui command, the laravel/ui package comes with another command for generating the auth scaffolding:

    php artisan ui:auth
    

    If you run the ui:auth command, it will generate the auth routes, a HomeController, auth views, and a app.blade.php layout file.


    If you want to generate the views alone, type the following command instead:

    php artisan ui:auth --views
    

    If you want to generate the auth scaffolding at the same time:

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

    php artisan ui vue --auth command will create all of the views you need for authentication and place them in the resources/views/auth directory

    The ui command will also create a resources/views/layouts directory containing a base layout for your application. All of these views use the Bootstrap CSS framework, but you are free to customize them however you wish.

    More detail follow. laravel-news & documentation

    Simply you've to follow this two-step.

    composer require laravel/ui
    php artisan ui:auth
    
    0 讨论(0)
提交回复
热议问题