1 | <?php |
||
11 | class ShowArticleCommand extends Command |
||
12 | { |
||
13 | use AsksForArticles; |
||
14 | |||
15 | /** |
||
16 | * The name and signature of the console command. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $signature = 'article:show {id? : The article id to show}'; |
||
21 | |||
22 | /** |
||
23 | * The console command description. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $description = 'Show an articl'; |
||
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() |
||
66 | } |
||
67 |
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.