krgm.so-manager-dev.com/app/Models/Term.php

38 lines
681 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Term extends Model
{
protected $table = 'terms'; // テーブル名
protected $primaryKey = 'terms_id'; // 主キー
public $timestamps = true; // created_at / updated_at
protected $fillable = [
'city_id',
'use_flag',
'terms_revision',
'terms_text',
'memo',
'start_date',
'operator_id',
];
protected $casts = [
'start_date' => 'date',
'use_flag' => 'boolean',
];
/**
* 利用規約のリストを取得
*/
public static function getList()
{
return self::all();
}
}