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