How to check user login or not in Laravel 5?

By Hardik Savani | April 28, 2016 | | 34343 Viewer | Category : Laravel


If you are new and you trying to find how to detect user is login or not in your laravel application. So, it is very easy to check because laravel 5 provide to Auth facade for check user is login or not. Check bellow example:

Example:

@if (Auth::check())

{!! print_r("User is login.") !!}

@else

{!! print_r("User is not login.") !!}

@endif



Hardik Savani
My name is Hardik Savani. I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.
Follow Me: Github Twitter
***Do you want me hire for your Project Work? Then Contact US.