I'm really desperate. I'm migrating a laravel project from 5.2 to 5.5 and it's all going to perfection. But I'm having problem to use a Request object in controller constructor. It seems that the controllers skip the middleware if I use Request object. I tried to use $this->middleware('api'); but not working.
public function __construct(Request $req) {
$this->lablacoCommerce = new LablacoCommerce($req->user->currency()->currency);
}
The api routes are correctly set and the other controllers working!
What have I forgotten?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2wIuLmu
via IFTTT
Aucun commentaire:
Enregistrer un commentaire