[New post] PHP code snippet – How to check if a user is logged in in a non middleware controller in laravel?
Subash Chandran posted: "How to check if a user is logged in, in a non middleware controller in laravel? auth Auth::guard if (Auth::guard('api')->check()){ //will return true if logged in //do this } else //if the user is not logged in { //do"
How to check if a user is logged in, in a non middleware controller in laravel? auth Auth::guard if (Auth::guard('api')->check()){ //will return true if logged in //do this } else //if the user is not logged in { //do this }
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.