Snapshot of main at 9f39a6e1e (2026-11-02)

This commit is contained in:
Ronald Huynen committed 2026-11-02 10:41:47 +01:00
commit 6ccf1792d7
2580 files changed
+1040202

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
<?php
namespace App\Models\Locations;
use App\Models\Scopes\LocalizeScope;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\App;
class CountryLocale extends Model
{
/**
* The database table doesn't use 'created_at' and 'updated_at' so we disable it from Inserts/Updates.
*
* @var bool
*/
public $timestamps = false;
protected static function booted()
{
// Scope a query to only include country locales that match the current application locale or fallback locale.
static::addGlobalScope(new LocalizeScope);
}
public function country()
{
return $this->belongsTo(Country::class, 'country_id');
}
}