更新 app/Models/City.php
All checks were successful
Deploy preview (main_kin) / deploy (push) Successful in 12s
All checks were successful
Deploy preview (main_kin) / deploy (push) Successful in 12s
This commit is contained in:
parent
dc2e59301f
commit
b77a048c68
@ -6,13 +6,23 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
|
|
||||||
class City extends Model
|
class City extends Model
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $table = 'city';
|
protected $table = 'city';
|
||||||
protected $primaryKey = 'city_id';
|
protected $primaryKey = 'city_id';
|
||||||
protected $keyType = 'int';
|
protected $keyType = 'int';
|
||||||
public $incrementing = true;
|
public $incrementing = true;
|
||||||
|
protected $fillable = [
|
||||||
|
'city_id',
|
||||||
|
'city_name',
|
||||||
|
'print_layout',
|
||||||
|
'city_user',
|
||||||
|
'city_remarks',
|
||||||
|
'created_at',
|
||||||
|
'updated_at',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 都市のリストを取得
|
||||||
|
*/
|
||||||
public static function getList(?int $operatorId = null): array
|
public static function getList(?int $operatorId = null): array
|
||||||
{
|
{
|
||||||
return static::query()
|
return static::query()
|
||||||
@ -21,4 +31,6 @@ class City extends Model
|
|||||||
->pluck('city_name', 'city_id')
|
->pluck('city_name', 'city_id')
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user