Category: Laravel

In this tutorial, we’re going to create a new Laravel listener that will listen to the user logged in event and then update the user record with the time they logged in. This is a handy feature to check how often your users are logging in and which ones are most active in your application. Laravel has a built feature to create events in your application, this will allow you to run code based off different actions in your application. If you’ve used WordPress before you can use this in a similar way to the action and filter hooks.

With the new column created we can listen for the logged in event and save the current date time to the user column.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners