Answers for "create command laravel sample parameter"

PHP
0

create command laravel sample parameter

// 1
protected $signature = 'add:itemstocat {keyword} {category_id}';
// 2
public function handle()
 {
     if ($this->confirm('This will run the command code continue?')) {
         // Do something here.
        $keyword = $this->argument('keyword');
        $category_id = $this->argument('category_id');
         // Do something here.
       
     }
Posted by: Guest on September-17-2021

Code answers related to "create command laravel sample parameter"

Browse Popular Code Answers by Language