Immutable Date Setup

Configuration

// in app/Service/ImmutableDateService.php

use Carbon\CarbonImmutable;
use Illuminate\Support\Facades\Date;
use Illuminate\Support\ServiceProvider;

class ImmutableDateService extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        Date::use(CarbonImmutable::class);
    }
}

Revision #1
Created 2026-07-29 13:34:28 UTC by Tomáš Havlas
Updated 2026-07-29 13:35:22 UTC by Tomáš Havlas