1 | <?php |
||
20 | class AdminController extends FlareController |
||
21 | { |
||
22 | use AuthenticatesUsers; |
||
23 | use ThrottlesLogins; |
||
24 | use ResetsPasswords; |
||
25 | use RegistersUsers; |
||
26 | use DispatchesJobs; |
||
27 | |||
28 | /** |
||
29 | * Auth. |
||
30 | * |
||
31 | * @var Guard |
||
32 | */ |
||
33 | protected $auth; |
||
34 | |||
35 | /** |
||
36 | * __construct. |
||
37 | * |
||
38 | * @param Guard $auth |
||
39 | * @param AdminManager $adminManager |
||
40 | */ |
||
41 | public function __construct(Guard $auth, AdminManager $adminManager) |
||
47 | |||
48 | /** |
||
49 | * Show the Dashboard. |
||
50 | * |
||
51 | * @return \Illuminate\Http\Response |
||
52 | */ |
||
53 | public function getDashboard() |
||
63 | |||
64 | /** |
||
65 | * Show the login form. |
||
66 | * |
||
67 | * @return \Illuminate\Http\Response |
||
68 | */ |
||
69 | public function getLogin() |
||
73 | |||
74 | /** |
||
75 | * Log the user. |
||
76 | * |
||
77 | * @return \Illuminate\Http\RedirectReponse |
||
78 | */ |
||
79 | public function getLogout() |
||
85 | |||
86 | /** |
||
87 | * Display the form to request a password reset link. |
||
88 | * |
||
89 | * @return \Illuminate\Http\Response |
||
90 | */ |
||
91 | public function getEmail() |
||
95 | |||
96 | /** |
||
97 | * Display the form to request a password reset link. |
||
98 | * |
||
99 | * @return \Illuminate\Http\Response |
||
100 | */ |
||
101 | public function getReset() |
||
105 | |||
106 | /** |
||
107 | * Performs the login redirect action. |
||
108 | * |
||
109 | * If the authenticated user has admin permissions |
||
110 | * then they will be redirected into the admin |
||
111 | * panel. If they do no, they will be sent |
||
112 | * to the homepage of the website. |
||
113 | * |
||
114 | * @return \Illuminate\Http\RedirectReponse |
||
115 | */ |
||
116 | public function redirectPath() |
||
124 | |||
125 | /** |
||
126 | * Get the path to the login route. |
||
127 | * |
||
128 | * @return string |
||
129 | */ |
||
130 | public function loginPath() |
||
134 | |||
135 | /** |
||
136 | * Method is called when the appropriate controller |
||
137 | * method is unable to be found or called. |
||
138 | * |
||
139 | * @param array $parameters |
||
140 | * |
||
141 | * @return \Illuminate\Http\Response |
||
142 | */ |
||
143 | public function missingMethod($parameters = array()) |
||
147 | } |
||
148 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: