akubiczek /
applicake-backend
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace App\Http\Middleware; |
||||
| 4 | |||||
| 5 | use Closure; |
||||
| 6 | |||||
| 7 | /** |
||||
| 8 | * Class AddHeaderAccessToken. |
||||
| 9 | */ |
||||
| 10 | class AddHeaderAccessToken |
||||
| 11 | { |
||||
| 12 | /** |
||||
| 13 | * Handle an incoming request. |
||||
| 14 | * |
||||
| 15 | * @param \Illuminate\Http\Request $request |
||||
| 16 | * @param \Closure $next |
||||
| 17 | * |
||||
| 18 | * @return mixed |
||||
| 19 | */ |
||||
| 20 | public function handle($request, Closure $next) |
||||
| 21 | { |
||||
| 22 | if ($request->has('access_token')) { |
||||
|
0 ignored issues
–
show
|
|||||
| 23 | $request->headers->set('Authorization', 'Bearer '.$request->get('access_token')); |
||||
|
0 ignored issues
–
show
The method
get() does not exist on Illuminate\Http\Request.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||
| 24 | } |
||||
| 25 | |||||
| 26 | return $next($request); |
||||
| 27 | } |
||||
| 28 | } |
||||
| 29 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.