2016-08-22 8 views
0

私はしかし、それは戻っています、スケジューラを作成するためにmake:consoleを使用しようとしている:これは、バージョン5.0より前だったが、私はあれば十分メイク:コマンドはLaravelで定義されていない5.1.7

[InvalidArgumentException]    
    Command "make:console" is not defined. 
    Did you mean one of these?  
    make:seeder       
    make:migration 

フェア現在5.1.7を使用しています。何がこの問題を引き起こす可能性がありますか?私は、バージョン5.2にcomposer.jsonを変更した場合

help    Displays help for a command 
    list    Lists commands 
    migrate    Run the database migrations 
    serve    Serve the application on the PHP development server 
cache 
    cache:clear   Flush the application 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:seeder   Create a new seeder class 
migrate 
    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:subscribe  Subscribe a URL to an Iron.io push queue 
    queue:table   Create a migration for the queue jobs database table 
    queue:work   Process the next job on a queue 
schedule 
    schedule:run  Run the scheduled commands 

* Iは、コマンドのさえスリム選択受信:ここ

は、現在利用可能なコマンドの一覧です。私はワーク・を見つける

help    Displays help for a command 
    list    Lists commands 
    migrate   Run the database migrations 
cache 
    cache:clear  Flush the application cache 
db 
    db:seed   Seed the database with records 
make 
    make:migration Create a new migration file 
migrate 
    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: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:work  Process the next job on a queue 
schedule 
    schedule:run  Run the scheduled commands 
+2

あなた 'make'コマンドオプションは真剣に不十分と思われる。 'controller'、' model'などのオプションはありません。エラーのインストールを確認してください。 – linuxartisan

+0

おそらく、 '作者の更新'を実行しようとします。 @ linuxartisanは、あなたが**そこにいるはずのいくつかのコマンドが欠けていることを示唆しています。 – James

+0

ええ、私はそれにも気付きました。 'composer update'を実行すると、多くの照明コンポーネントが更新されましたが、私はまだ同じ問題を抱えています。 – Jake

答えて

1

をまわり。私のLaravel CLIには前述のコマンドがありませんでしたが、私はスケジューリングとコマンドファイル構造を操作しました。

Commandsディレクトリに手動でexample_scheduled_command.phpを作成し、Kernal.phpに登録してください。それからあなたはLaravel Schedulingのためにそれを利用することができます。

0

私は同じ問題を抱えていたが、私は

php artisan make:console AssignUsers --command=users:assign 

を使用して、それを解決し、その後、アプリ/コンソール/ Kernel.phpでコマンドを登録することができ

参照:https://laravel.com/docs/5.0/commands

関連する問題