breadthe / laravel-starter-timezone
Timezone scaffolding for Laravel's Livewire starter kit.
Package info
github.com/breadthe/laravel-starter-timezone
pkg:composer/breadthe/laravel-starter-timezone
Requires
- php: ^8.3
- illuminate/console: ^12.0|^13.0
- illuminate/filesystem: ^12.0|^13.0
- illuminate/support: ^12.0|^13.0
- laravel/fortify: ^1.20
- laravel/prompts: ^0.3
- livewire/flux: ^2.0
- livewire/livewire: ^4.0
Requires (Dev)
- laravel/pint: ^1.18
- orchestra/testbench: ^10.0|^11.0
- pestphp/pest: ^3.0|^4.0|^5.0
- pestphp/pest-plugin-laravel: ^3.0|^4.0|^5.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
🚨This project is 100% vibe-engineered! It's strictly meant for my own consumption. Use at your own risk!
Adds a user's IANA timezone to a fresh Laravel Livewire starter-kit application.
The installer creates a reversible users.timezone migration and safely scaffolds timezone controls into the Fortify registration action, the registration page, and the Livewire profile settings page. The browser detects a supported IANA timezone automatically; UTC is the reliable fallback.
Supported applications
This is intentionally not a general-purpose timezone package. It is for a Laravel application scaffolded with the Livewire starter kit and its Laravel Fortify-based authentication.
- PHP 8.3+
- Laravel 12 or 13 with the current Livewire 4 starter-kit structure
- Laravel Fortify registration (the starter kit's standard
App\Actions\Fortify\CreateNewUseraction) - Livewire 4 and Flux UI, using the starter kit's full-page profile component at
resources/views/pages/settings/profile.blade.php(with or without Livewire's⚡filename prefix) - Laravel's standard database-backed user authentication
It does not support WorkOS, Inertia, React, Livewire 3 / Volt-era starter kits, API-only Fortify, a custom authentication action, or a heavily customized starter-kit profile page. Those integrations need a purpose-built installer rather than a fragile patcher.
Install it immediately after scaffolding, before changing the auth views or profile component. The command recognizes the current Laravel 12/13 Livewire starter-kit registration view at either resources/views/auth/register.blade.php or resources/views/pages/auth/register.blade.php.
Compatible project scaffolding
When creating a fresh Laravel project, choose the Livewire frontend stack and Laravel's built-in authentication:
Installation
composer require breadthe/laravel-starter-timezone php artisan starter-timezone:install
The interactive command presents one multi-select prompt. All three operations are selected by default; use Space to toggle an operation and Enter to continue:
- Add a
timezonestring column tousers, defaulting toUTC. - Add a timezone select field to registration, including browser detection.
- Add a timezone select field and a Detect button to
/settings/profile.
Finish by running the migration:
php artisan migrate
For unattended provisioning, no option is needed: non-interactive runs select all three operations.
php artisan starter-timezone:install --no-interaction
To apply only one surface, pass one or more selection flags:
php artisan starter-timezone:install --migration php artisan starter-timezone:install --registration --profile
The installer stops before writing anything if it cannot recognize a required starter-kit file. It also refuses to patch a file that already mentions timezone, protecting hand-written changes. Review that file first; only then use --force if you want the installer to continue with the remaining supported changes.
Installer walkthrough
What it looks like
After installing the package and running the migration, the standard Laravel Livewire starter-kit screens include the timezone field on registration and in profile settings.
Registration
Profile settings
What is generated
The migration is conventional and reversible:
Schema::table('users', function (Blueprint $table) { $table->string('timezone')->default('UTC'); });
When registration is selected, the installer:
- makes
timezonefillable onApp\Models\User(supporting both Laravel's usual$fillableproperty and Chisel's#[Fillable]attribute); - validates registration and profile submissions against
DateTimeZone::listIdentifiers(); - stores the submitted registration timezone; and
- renders dropdowns populated with IANA timezone names.
The profile field uses Livewire's normal model binding. Its Detect button dispatches a bubbling change event after setting the browser-detected zone so Livewire receives the update.
Development
composer install
composer format
composer test
The test suite verifies each source transformation and the non-interactive installer. GitHub Actions tests supported Laravel 12 and 13 releases on PHP 8.3, 8.4, and 8.5, and checks formatting before running Pest.
Release checklist
Before tagging a release, test against a freshly scaffolded Livewire starter kit for every Laravel version listed above. The installer deliberately relies on starter-kit file structure, so a starter-kit template change is a compatibility event and should be covered with a fixture and CI matrix entry before being advertised as supported.
License
The MIT License (MIT). See LICENSE.md.





