Step 1 In table “users”, add new column named “timezone”, with type varchar to store user’s timezone:- You can create migration file then do migrate (https://laravel.com/docs/7.x/migrations#generating-migrations)- Or simply run this sql command: Step 2Way Automatically update timezones when user login In App\Http\Controllers\Auth\LoginController, override authenticated function: In above snippet, we used Laravel Http Client and a third party service (https://ip-api.com/) to get user’s timezone from his IP address, then save it to database.
Note: To save response time of login requests, you can create new Laravel job and do necessary task there
then modify the register controller and user model if needed to store timezone once user hit register button Step 3In blade files, call setTimezone method to display datetime in user’s timezoneExample: Good luck!