php artisan make auth 未在 Laravel 6 中定义

-1 php laravel laravel-6

这是我做的第一件事

php artisan make:auth
Run Code Online (Sandbox Code Playgroud)

结果:

  Command "make:auth" is not defined.

  Did you mean one of these?
      make:channel
      make:command
      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:seeder
      make:test
Run Code Online (Sandbox Code Playgroud)
  1. 第二个:

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

我试过这个,这是结果

The "http://repo.packagist.org/p/provider-2015%24e84cdb7b9b7175f18a814c1783741a3ba6b021c4a78701285cc5639d0d1ee4e6.json"
Run Code Online (Sandbox Code Playgroud)

文件无法下载:无法打开流:HTTP 请求失败!

http://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Run Code Online (Sandbox Code Playgroud)

我该怎么办?-谢谢

Ken*_*rna 6

我该怎么办?

阅读文档

从 Laravel 6+ 开始,您需要先安装分离的 UI 包才能生成 Auth 脚手架:

composer require laravel/ui --dev
Run Code Online (Sandbox Code Playgroud)

届时,您将能够运行以下其中一项:

// Generate basic scaffolding...
php artisan ui bootstrap
php artisan ui vue
php artisan ui react

// Generate login / registration scaffolding...
php artisan ui bootstrap --auth
php artisan ui vue --auth
php artisan ui react --auth
Run Code Online (Sandbox Code Playgroud)