| 1 | <?php | ||
| 13 | class CreateEventCommand extends Command | ||
| 14 | { | ||
| 15 | /** | ||
| 16 | * The name and signature of the console command. | ||
| 17 | * | ||
| 18 | * @var string | ||
| 19 | */ | ||
| 20 |     protected $signature = 'event:create {name? : The event name} {user_id? : The user id} {description? : The event description}'; | ||
| 21 | |||
| 22 | /** | ||
| 23 | * The console command description. | ||
| 24 | * | ||
| 25 | * @var string | ||
| 26 | */ | ||
| 27 | protected $description = 'Creates a new event'; | ||
| 28 | |||
| 29 | /** | ||
| 30 | * Create a new command instance. | ||
| 31 | * | ||
| 32 | * @return void | ||
|  | |||
| 33 | */ | ||
| 34 | public function __construct() | ||
| 38 | |||
| 39 | /** | ||
| 40 | * Execute the console command. | ||
| 41 | * | ||
| 42 | * @return mixed | ||
| 43 | */ | ||
| 44 | public function handle() | ||
| 57 | } | ||
| 58 | 
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.