【发布时间】:2020-09-03 10:25:33
【问题描述】:
我已经安装了 Lumen 5.8 和 l5-repository。 这是我在 composer.json 中的需求列表:
"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-repository中提供的说明进行操作
在 bootstrap/app.php 中放置:
$app->register(Prettus\Repository\Providers\LumenRepositoryServiceProvider::class);
但是通过以下命令发布后:
php artisan vendor:publish --provider "Prettus\Repository\Providers\RepositoryServiceProvider"
app/config目录下没有生成文件
然后在运行命令之后
php artisan make:entity Post
显示以下错误:
Command "make:entity" is not defined.
Did you mean one of these?
make:migration
make:repository
make:seeder
要查看命令列表,我尝试了“php artisan”命令并发现以下结果:
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
有没有人遇到过这个问题并得到了解决方案?
【问题讨论】: