Laravel User Timezones Project: Convert, Display, Send Notifications

  • 11 lessons
  • 9948 words

This content is available only for premium members.

About this course

In this course, we will create a demo Laravel project implementing timezones based on the user's choice. The course will be split into 3 parts:

Part 1. Timezone in Users Table: Registration

We will take the default Laravel Breeze and add a timezone field choice to it.

Part 2. Showing/Converting Date/Time with User's Timezone

Then we will personalize the display of specific dates to the user's timezone.

This will be done with Middleware and a few custom Helper functions.

Part 3. Schedule Notification Emails in User's Timezone

Here, we will schedule notifications to be sent to the user at a specific time, considering different time zones. For example, you would want to send a message to all of your users on Monday at 8:00 AM.

It will be done with a combination of:

  • Database-saved Notifications
  • Laravel Events/Listeners to create/update/delete them
  • Laravel Jobs/Scheduler to send them at the right time

As usual, you will find repository links with the code for each part of the course.

Let's get started!