Skip to content

Commit

Permalink
Merge pull request #8 from philbates35/use-carbon-immutable-by-default
Browse files Browse the repository at this point in the history
Use CarbonImmutable by default
  • Loading branch information
philbates35 authored Jan 24, 2024
2 parents c48ccfd + 3df70c5 commit bdf7fd3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

namespace App\Providers;

use Carbon\CarbonImmutable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Date;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\ServiceProvider;
use Illuminate\Translation\Translator;
Expand Down Expand Up @@ -39,6 +41,8 @@ public function register(): void
*/
public function boot(): void
{
Date::useClass(CarbonImmutable::class);

if ($this->isProduction()) {
Model::shouldBeStrict();
}
Expand Down

0 comments on commit bdf7fd3

Please sign in to comment.