| 1 | <?php |
||
| 16 | class LocaleCookieRedirect extends Middleware |
||
| 17 | { |
||
| 18 | /* ----------------------------------------------------------------- |
||
| 19 | | Main Methods |
||
| 20 | | ----------------------------------------------------------------- |
||
| 21 | */ |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Handle an incoming request. |
||
| 25 | * |
||
| 26 | * @param \Illuminate\Http\Request $request |
||
| 27 | * @param \Closure $next |
||
| 28 | * |
||
| 29 | * @return mixed |
||
| 30 | */ |
||
| 31 | 6 | public function handle(Request $request, Closure $next) |
|
| 50 | } |
||
| 51 |
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: