dimanche 29 octobre 2017

Remove query scope from auto-loaded resource in Laravel resource controller

In Laravel 5, if using a resource controller, the model gets loaded automatically and comes through in to the method.
However, I have a query scope checking if my model is active of not. For this one specific case, I'd like to remove that query scope, but leave it on the other methods in the class.

How can I do that? I assume it is in some middleware somewhere, but I can't find where.

Thanks.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire