更新 app/Models/City.php

This commit is contained in:
gitadmin 2025-08-23 00:10:26 +09:00
parent a5af8ff78c
commit a5f6cb737e

View File

@ -7,11 +7,17 @@ use Illuminate\Database\Eloquent\Model;
class City extends Model class City extends Model
{ {
protected $table = 'city'; protected $table = 'city';
// プライマリーキーはLaravelのデフォルト('id')を使用
public $timestamps = true; public $timestamps = true;
protected $primaryKey = 'city_id';
protected $fillable = [ protected $fillable = [
// 実際のカラム名が不明のため、一旦空にする 'city_id',
'city_name',
'print_layout',
'city_user',
'city_remarks',
'created_at',
'updated_at',
]; ];
/** /**
@ -21,4 +27,8 @@ class City extends Model
{ {
return self::all(); return self::all();
} }
} }