Check if user is logged in laravel 4

Viewed 13018

Hi I am implementing a chat/inbox feature on my website. When users are not logged in and receive a message from another user, the website will send an email to the recipient of the message. However when the user is logged in it won't.

My questions is how do I tell whether a user is logged in or not? For example, if a user is logged in and then closes the browser my backend wouldn't know anything.

Btw I'm building a Angularjs SPA with a restful API in Laravel 4.?

2 Answers
Related