mardi 12 septembre 2017

Call to undefined method Symfony\Component\HttpFoundation\Response::withCookie()

I've just upgraded to Laravel 5.5 and am using Passport for the first time. I've successfully tested my API auth and requests through Postman, but I'm getting this error when trying to consume API from my web frontend, I get this error:

Call to undefined method Symfony\Component\HttpFoundation\Response::withCookie()

Line 51 in MyProject/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php looks like this:

$response->withCookie($this->cookieFactory->make(

I've added the line below in web section of $middlewareGroups in app/Http/Kernel.php

\Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,

I'm using Laravel 5.5.3 with Passport 4.0.2 Any help appreciated!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire