These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php namespace Arcanesoft\Foundation\Http\Controllers\Admin\System; |
||
2 | |||
3 | use Arcanedev\RouteViewer\Contracts\RouteViewer; |
||
4 | use Arcanesoft\Foundation\Policies\RouteViewerPolicy; |
||
5 | |||
6 | /** |
||
7 | * Class RoutesController |
||
8 | * |
||
9 | * @package Arcanesoft\Foundation\Http\Controllers\System |
||
10 | * @author ARCANEDEV <[email protected]> |
||
11 | */ |
||
12 | class RoutesController extends Controller |
||
13 | { |
||
14 | /* ----------------------------------------------------------------- |
||
15 | | Properties |
||
16 | | ----------------------------------------------------------------- |
||
17 | */ |
||
18 | |||
19 | /** |
||
20 | * The route viewer instance. |
||
21 | * |
||
22 | * @var \Arcanedev\RouteViewer\Contracts\RouteViewer |
||
23 | */ |
||
24 | protected $routeViewer; |
||
25 | |||
26 | /* ----------------------------------------------------------------- |
||
27 | | Constructor |
||
28 | | ----------------------------------------------------------------- |
||
29 | */ |
||
30 | |||
31 | /** |
||
32 | * RoutesController constructor. |
||
33 | * |
||
34 | * @param \Arcanedev\RouteViewer\Contracts\RouteViewer $routeViewer |
||
35 | */ |
||
36 | public function __construct(RouteViewer $routeViewer) |
||
37 | { |
||
38 | parent::__construct(); |
||
39 | |||
40 | $this->routeViewer = $routeViewer; |
||
41 | |||
42 | $this->setCurrentPage('foundation-system-routes'); |
||
43 | $this->addBreadcrumbRoute(trans('foundation::route-viewer.titles.routes'), 'admin::foundation.system.routes.index'); |
||
44 | } |
||
45 | |||
46 | /* ----------------------------------------------------------------- |
||
47 | | Main Methods |
||
48 | | ----------------------------------------------------------------- |
||
49 | */ |
||
50 | |||
51 | public function index() |
||
52 | { |
||
53 | $this->authorize(RouteViewerPolicy::PERMISSION_LIST); |
||
0 ignored issues
–
show
|
|||
54 | |||
55 | $this->setTitle($title = trans('foundation::route-viewer.titles.routes-list')); |
||
56 | $this->addBreadcrumb($title); |
||
57 | |||
58 | return $this->view('admin.system.routes.list', [ |
||
59 | 'routes' => $this->routeViewer->all() |
||
60 | ]); |
||
61 | } |
||
62 | } |
||
63 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: