Skip to content

PHP code snippet – How send parameter with command in laravel?

1 ) protected $signature = 'testCommand:refresh {name} {option}';
2 ) php artisan help testCommand:refresh
3 ) Usage:
  testCommand:refresh <name> <option>
4 ) public function handle()
    {
        return $this->info('the name is => '.$this->argument('name'). " the option is =>" .$this->argument('option'));
    }    
See also  Java code snippet - How do I change the opacity of a JButton?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.