Creating and using Laravel 4 commands

前端 未结 4 883
孤独总比滥情好
孤独总比滥情好 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条回答
  •  -上瘾入骨i
    2021-02-06 02:01

    try this.

    protected function getArguments()
    {
        return [];
    }
    
    protected function getOptions()
    {
        return [];
    } 
    

    also add this in /app/start/artisan.php

    Artisan::add(new ParseCommand);
    

    then Run Command on Root directory

    ./artisan command:import; 
    

提交回复
热议问题