更新 app/Models/City.php
This commit is contained in:
parent
a5af8ff78c
commit
a5f6cb737e
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user