Creating and using Laravel 4 commands

前端 未结 4 889
孤独总比滥情好
孤独总比滥情好 2021-02-06 01:37

EDIT: Figured out where I was going wrong and placed an answer at the end

I\'m trying to create a Laravel Command, I can see it\'s changed considerably from \"tasks\" in

4条回答
  •  渐次进展
    2021-02-06 02:00

    In newer Laravel versions there isn't an import command. You just have to do the following two thing:

    1. Register your command in app/start/artisan.php:

      Artisan::add(new Import);
      
    2. Run the command in Artisan:

      php artisan command:name Import
      

提交回复
热议问题