Files
afriadirahman 8c6dad2a31
tests / ci (push) Canceled after 0s
Admin Panel
2026-09-29 14:57:37 +07:00

41 lines
943 B
PHP

<?php
namespace App\Models;
use App\Support\SiteInfo;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property string $name
* @property string $icon
* @property string $building
* @property string $street
* @property string $area
* @property string $city
* @property string $district
* @property string $phone
* @property string|null $maps_url
* @property int $sort_order
*/
#[Fillable(['name', 'icon', 'building', 'street', 'area', 'city', 'district', 'phone', 'maps_url', 'sort_order'])]
class Office extends Model
{
protected static function booted(): void
{
static::saved(fn () => SiteInfo::forget());
static::deleted(fn () => SiteInfo::forget());
}
/**
* @return array<string, string>
*/
protected function casts(): array
{
return [
'sort_order' => 'integer',
];
}
}