1 | <?php |
||
10 | class AddCustomRouteContent extends Command |
||
11 | { |
||
12 | /** |
||
13 | * The name and signature of the console command. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $signature = 'backpack:base:add-custom-route |
||
18 | {code : HTML/PHP code that registers a route. Use either single quotes or double quotes. Never both. }'; |
||
19 | |||
20 | /** |
||
21 | * The console command description. |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $description = 'Add HTML/PHP code to the routes/backpack/custom.php file'; |
||
26 | |||
27 | /** |
||
28 | * Create a new command instance. |
||
29 | * |
||
30 | * @return void |
||
|
|||
31 | */ |
||
32 | public function __construct() |
||
36 | |||
37 | /** |
||
38 | * Execute the console command. |
||
39 | * |
||
40 | * @return mixed |
||
41 | */ |
||
42 | public function handle() |
||
84 | } |
||
85 |
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.