adrema/app/Region.php

25 lines
481 B
PHP
Raw Normal View History

2020-04-12 00:26:44 +02:00
<?php
namespace App;
2022-03-20 12:20:01 +01:00
use Illuminate\Database\Eloquent\Collection;
2022-08-12 22:07:59 +02:00
use Illuminate\Database\Eloquent\Factories\HasFactory;
2020-04-12 00:26:44 +02:00
use Illuminate\Database\Eloquent\Model;
class Region extends Model
{
2022-08-12 22:07:59 +02:00
use HasFactory;
2020-04-12 00:26:44 +02:00
public $timestamps = false;
public $fillable = ['name', 'nami_id', 'is_null'];
public $casts = [
2022-03-11 20:19:17 +01:00
'is_null' => 'boolean',
2020-04-12 00:26:44 +02:00
];
2022-03-20 12:20:01 +01:00
public static function forSelect(): Collection
{
return static::select('id', 'name')->get();
}
2020-04-12 00:26:44 +02:00
}