Skip to content

Commit

Permalink
fix Locale::makeDefault()
Browse files Browse the repository at this point in the history
  • Loading branch information
mjauvin committed Apr 24, 2024
1 parent ab1cc3e commit b7de6cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions models/Locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ public function makeDefault()

$this->newQuery()->where('id', $this->id)->update(['is_default' => true]);
$this->newQuery()->where('id', '<>', $this->id)->update(['is_default' => false]);

static::$defaultLocale = $this;
Cache::forget('winter.translate.defaultLocale');
}

/**
Expand Down

0 comments on commit b7de6cf

Please sign in to comment.