Check if user is registered in laravel 4

Hi, I am using the chat / inbox function on my website. When users do not log in and receive a message from another user, the website will send an email to the recipient of the message. However, when a user logs in, he will not.

My questions are: how do I know if a user is logged in or not? For example, if a user logged in and then closed the browser, my backend would not know anything.

Btw Am I creating an Angularjs SPA with a soothing API in Laravel 4.?

+4
source share
2 answers

Ajax ping . last_logged_in Date , , last_logged_in . Ajax , ( ). , , last_logged_in (1 )..

, . is_logged_in, .

+4

, Laravel Auth:

if(Auth::check())
{
   //do something
}

, Sentry:

if(Sentry::check())
{
   //do something
}
+19

All Articles