1 | <?php |
||
10 | class ThemesController extends Controller |
||
11 | { |
||
12 | /** |
||
13 | * @var \Yajra\CMS\Themes\Repositories\Repository |
||
14 | */ |
||
15 | protected $themes; |
||
16 | |||
17 | /** |
||
18 | * ThemesController constructor. |
||
19 | * |
||
20 | * @param \Yajra\CMS\Themes\Repositories\Repository $themes |
||
21 | */ |
||
22 | public function __construct(Repository $themes) |
||
27 | |||
28 | /** |
||
29 | * Display themes resource. |
||
30 | * |
||
31 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
||
32 | */ |
||
33 | public function index() |
||
39 | |||
40 | /** |
||
41 | * Store new default theme. |
||
42 | * |
||
43 | * @param \Illuminate\Http\Request $request |
||
44 | * @return \Illuminate\Http\RedirectResponse |
||
45 | */ |
||
46 | public function store(Request $request) |
||
61 | |||
62 | /** |
||
63 | * Uninstall a theme. |
||
64 | * |
||
65 | * @param string $theme |
||
66 | * @return \Illuminate\Http\RedirectResponse |
||
67 | */ |
||
68 | public function destroy($theme) |
||
78 | } |
||
79 |
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: