首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >获取命令"make:entity“未定义。L5-存储库包Lumen 5.8中的错误

获取命令"make:entity“未定义。L5-存储库包Lumen 5.8中的错误
EN

Stack Overflow用户
提问于 2020-05-17 17:14:53
回答 1查看 1.3K关注 0票数 1

我安装了Lumen 5.8和L5-存储库。以下是composer.json中的需求列表:

代码语言:javascript
复制
"require": {
        "php": ">=7.1.3",
        "firebase/php-jwt": "^5.2",
        "laravel/lumen-framework": "5.8.*",
        "laravelista/lumen-vendor-publish": "^5.8",
        "league/fractal": "^0.19.2",
        "prettus/l5-repository": "2.1.*",
        "prettus/laravel-validation": "^1.2",
        "robclancy/presenter": "^1.4"
    }

我遵循了L5-储存库中提供的说明

在引导/app.php中放置:

$app->register(Prettus\Repository\Providers\LumenRepositoryServiceProvider::class);

但是,在通过以下命令发布之后:

php供应商:发布--提供者"Prettus\Repository\Providers\RepositoryServiceProvider“

在app/config目录中没有生成任何文件

然后在运行命令之后

php手工制作:实体发布

显示以下错误:

代码语言:javascript
复制
  Command "make:entity" is not defined.  

  Did you mean one of these?             
      make:migration                     
      make:repository                    
      make:seeder 

要查看命令列表,我尝试了"php artisan“命令,并找到了以下结果:

代码语言:javascript
复制
Laravel Framework Lumen (5.8.12) (Laravel Components 5.8.*)

Usage:
  command [options] [arguments]

Available commands:
  help                Displays help for a command
  list                Lists commands
  migrate             Run the database migrations
 auth
  auth:clear-resets   Flush expired password reset tokens
 cache
  cache:clear         Flush the application cache
  cache:forget        Remove an item from the cache
  cache:table         Create a migration for the cache database table
 db
  db:seed             Seed the database with records
 make
  make:migration      Create a new migration file
  make:repository     Create a new repository.
  make:seeder         Create a new seeder class
 migrate
  migrate:fresh       Drop all tables and re-run all migrations
  migrate:install     Create the migration repository
  migrate:refresh     Reset and re-run all migrations
  migrate:reset       Rollback all database migrations
  migrate:rollback    Rollback the last database migration
  migrate:status      Show the status of each migration
 queue
  queue:failed        List all of the failed queue jobs
  queue:failed-table  Create a migration for the failed queue jobs database table
  queue:flush         Flush all of the failed queue jobs
  queue:forget        Delete a failed queue job
  queue:listen        Listen to a given queue
  queue:restart       Restart queue worker daemons after their current job
  queue:retry         Retry a failed queue job
  queue:table         Create a migration for the queue jobs database table
  queue:work          Start processing jobs on the queue as a daemon
 schedule
  schedule:run        Run the scheduled commands
 vendor
  vendor:publish      Publish any publishable assets from vendor packages

有没有人面对这个问题并找到了解决办法?

EN

回答 1

Stack Overflow用户

发布于 2020-07-21 09:20:33

今天早上我也收到了同样的消息。我在EasyAdmin 3中使用Symfony 5.1.2,执行composer update更新了一些内容,但问题依然存在。我检查了.env.local,它被设置为prod而不是dev。把它放回dev里对我来说是个小把戏。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61855750

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档