I was reviewing some of the code logic on my system and wondered about some things. After a person has logged onto the system you can either use $request->user(); or Auth::user(); to get the user object.
My questions are:
- What are the key differences between the two other than the obvious ones?
- Is the user being pulled from the database in both cases or is one pulling the user object from some stored cache?
- Are both cases leveraging passport's functionality to get the user from the database? or is it being pulled from a mystical storage land that is difficult to find?
Thanks in advance, Cheers!
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2l4VRwU
via IFTTT
Aucun commentaire:
Enregistrer un commentaire