Open profxp opened 7 years ago
No answer? :-(
https://github.com/Zizaco/entrust/blob/master/src/Entrust/Entrust.php#L92 That functionality uses Route::filter()
and Route::when()
which rely on router events not triggering when caching is enabled.
Keep in mind those two functions were deprecated in Laravel 5.2 https://laravel.com/docs/5.2/upgrade#upgrade-5.2.0 so you should think about instead implementing your ACL using middleware where $request->route()
has the metadata required to assert whether a user has access.
Many thanks for your answer. I am not sure to understand: if I update my website to 5.2 then what will be the syntax I should use in order to have Entrust compatible with Laravel route caching.
I have no experience using this package, but give this a go: http://lmgtfy.com/?q=laravel+5.2+entrust+middleware.
Hi @derekmd you did not answer my previous question. If I update my website to 5.2 then what would be the syntax I should use in order to have Entrust compatible with Laravel route caching?
Many thanks.
🤦♂️
Hi there,
I use extensively your excellent plugin. Now I would like to to do route caching https://laravel.com/docs/5.1/controllers#route-caching but after doing so, it seems that the route cache completely ignores the Entrust rules set-up in the routes file. Is there a way to make Entrust compatible with route caching?
Thanks.