Laravel stores Auth::User() value to a variable on first query and retrives value from the variable on subsequent calls. The variable gets refreshed when the User model is updated. Considering the relation User->Account->Subscription i am able to retrieve authenticated user's subscription by Auth::user()->account()->subscription.The problem is when i update the Subscription model, this value is not refreshed. I am getting the old value. How can i make sure the the db query happens when the Subscription model is updated?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2ne5us3
via IFTTT
Aucun commentaire:
Enregistrer un commentaire