Laravel | How to check if a user is logged in, inside a blade file?

Admin   Laravel   1086  2021-03-16 02:50:05

Hello Dev,

If you have to check user login or not in laravel blade then it's provide directives. also you can check guest user in blade with directives. If needed, you may specify the authentication guard that should be checked when using the @auth and @guest directives.laravel check if user is logged in blade. in Blade check if user is logged in.

Only Login and Guest



// The user is login...



// The user is not login...


Check Login and Guest With Guard



// The user is login with admin...



// The user is not login with admin...


I hope it can help you...