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(); + } + + + }