How to check user login or not in Laravel?

Share Me
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Today now in this post i would like to show you how to check user is login or not in Laravel application? If you are new and if you are trying to find how to detect a user is login or not in your laravel application. So, it is very easy to check because laravel provide to Auth facade for the check user is login or not. Now you can check on bellow example:

Example:
@if (Auth::check())
	{!! print_r("User is login.") !!}
@else
	{!! print_r("User is not login.") !!}
@endif

Read Also : How to convert Object into Array in PHP?

Thanks for read. I hope it help you. For more you can follow us on facebook.

About code chef

My name is Shahriar sagor. I'm a developer. I live in Bangladesh and I love to write tutorials and tips that will help to other Developer's. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by code chef →