1 | <?php |
||
14 | class EditArticleCommand extends Command |
||
15 | { |
||
16 | use AsksForArticles; |
||
17 | use AsksForUsers; |
||
18 | |||
19 | /** |
||
20 | * The name and signature of the console command. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $signature = 'article:edit {id? : The article id} {title? : The article title} {description? : The article description} {user_id? : The user id}'; |
||
25 | |||
26 | /** |
||
27 | * The console command description. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $description = 'Edit an article'; |
||
32 | |||
33 | /** |
||
34 | * Create a new command instance. |
||
35 | * |
||
36 | * @return void |
||
|
|||
37 | */ |
||
38 | public function __construct() |
||
42 | |||
43 | /** |
||
44 | * Execute the console command. |
||
45 | * |
||
46 | * @return mixed |
||
47 | */ |
||
48 | public function handle() |
||
63 | } |
||
64 |
Adding a
@return
annotation 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.