I have a small application developed with Laravel, and I would like to share a variable (a result from a remote service, cached ) across all the controllers.
I read about ViewComposer, but they only work is a view is rendered (makes sense), and my app has many json responses.
I know that I could traditionally extend my controllers from a BaseController, but I wonder if anybody knows a way to do that without relying on inheritance.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1LwerCU
via IFTTT
Aucun commentaire:
Enregistrer un commentaire