mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2025-12-14 12:06:46 +00:00
- Introduced a `SetTimezone` middleware to dynamically apply user-specific timezones. - Added a `timezone chooser` component for users to select their timezone. - Enhanced date and time display in views with `asDate`, `asTime`, and `asDateTime` methods. - Updated `AppServiceProvider` to leverage `preventLazyLoading` in local environments and set custom `Carbon` instance for dates. - Expanded configuration with `user-timezone`. - Integrated timezone support into meetups and events for consistent scheduling.
30 lines
560 B
PHP
30 lines
560 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Support\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Facades\Date;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
Date::use(
|
|
Carbon::class
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
Model::preventLazyLoading(app()->environment('local'));
|
|
}
|
|
}
|