From b77a048c688616e917882a09539edeee7680cddb Mon Sep 17 00:00:00 2001 From: "go.unhi" Date: Mon, 1 Sep 2025 10:18:37 +0900 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20app/Models/City.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/City.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/app/Models/City.php b/app/Models/City.php index 95db5f8..ccfbd51 100644 --- a/app/Models/City.php +++ b/app/Models/City.php @@ -6,13 +6,23 @@ use Illuminate\Database\Eloquent\Model; class City extends Model { - protected $table = 'city'; protected $primaryKey = 'city_id'; protected $keyType = 'int'; 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 { return static::query() @@ -21,4 +31,6 @@ class City extends Model ->pluck('city_name', 'city_id') ->toArray(); } -} + + +}