From 66ad57252fa06c89a0ccaee0415d9bcd56551cdc Mon Sep 17 00:00:00 2001 From: gitadmin Date: Sat, 23 Aug 2025 00:10:46 +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 | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/app/Models/City.php b/app/Models/City.php index 6fefb99..97cb3b1 100644 --- a/app/Models/City.php +++ b/app/Models/City.php @@ -7,18 +7,28 @@ use Illuminate\Database\Eloquent\Model; class City extends Model { protected $table = 'city'; + public $timestamps = true; protected $primaryKey = 'city_id'; + protected $fillable = [ + 'city_id', + 'city_name', + 'print_layout', + 'city_user', + 'city_remarks', + 'created_at', + 'updated_at', + ]; -protected $fillable = [ - 'city_id', - 'city_name', - 'print_layout', - 'city_user', - 'city_remarks', - 'created_at', - 'updated_at', -]; - + /** + * 都市のリストを取得 + */ + public static function getList() + { + return self::all(); + } + + + }