1 | <?php |
||
13 | class PartialParts extends Command |
||
14 | { |
||
15 | /** |
||
16 | * The console command name. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $name = 'partial-parts'; |
||
21 | |||
22 | /** |
||
23 | * The console command description. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $description = 'List all registered routes'; |
||
28 | |||
29 | /** |
||
30 | * The router instance. |
||
31 | * |
||
32 | * @var \Illuminate\Routing\Router |
||
33 | */ |
||
34 | protected $router; |
||
35 | |||
36 | /** |
||
37 | * The table headers for the command. |
||
38 | * |
||
39 | * @var array |
||
40 | */ |
||
41 | protected $headers = ['Domain', 'Method', 'URI', 'Name', 'Action', 'Middleware']; |
||
42 | |||
43 | /** |
||
44 | * The columns to display when using the "compact" flag. |
||
45 | * |
||
46 | * @var array |
||
47 | */ |
||
48 | protected $compactColumns = ['method', 'uri', 'action']; |
||
49 | |||
50 | /** |
||
51 | * Create a new route command instance. |
||
52 | * |
||
53 | * @param \Illuminate\Routing\Router $router |
||
54 | * @return void |
||
|
|||
55 | */ |
||
56 | public function __construct(Router $router) |
||
62 | |||
63 | /** |
||
64 | * Execute the console command. |
||
65 | * |
||
66 | * @return void |
||
67 | */ |
||
68 | public function handle() |
||
81 | |||
82 | /** |
||
83 | * Get the route information for a given route. |
||
84 | * |
||
85 | * @param \Illuminate\Routing\Route $route |
||
86 | * @return array |
||
87 | */ |
||
88 | protected function getPartialPartsMiddleware(Route $route) |
||
98 | } |
||
99 |
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.