create command laravel sample parameter

Solutions on MaxInterview for create command laravel sample parameter by the best coders in the world

showing results for - "create command laravel sample parameter"
Théo
10 Jul 2017
1// 1
2protected $signature = 'add:itemstocat {keyword} {category_id}';
3// 2
4public function handle()
5 {
6     if ($this->confirm('This will run the command code continue?')) {
7         // Do something here.
8        $keyword = $this->argument('keyword');
9        $category_id = $this->argument('category_id');
10         // Do something here.
11       
12     }
13