Files
timebank-cc-public/app/Models/Locations/DivisionLocale.php
Ronald Huynen 2547717edb Initial commit
2026-03-23 21:37:59 +01:00

29 lines
672 B
PHP

<?php
namespace App\Models\Locations;
use App\Models\Scopes\LocalizeScope;
use Illuminate\Database\Eloquent\Model;
class DivisionLocale 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 division()
{
return $this->belongsTo(Division::class, 'division_id');
}
}