phpvms/app/Models/PirepEvent.php

48 lines
739 B
PHP
Raw Normal View History

2017-07-24 02:07:41 +08:00
<?php
namespace App\Models;
use Eloquent as Model;
/**
* Class PirepEvent
*
* @package App\Models
*/
class PirepEvent extends Model
{
public $table = 'pirep_fields';
public $fillable
= [
'name',
'value',
];
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts
= [
'name' => 'string',
'required' => 'integer',
];
/**
* Validation rules
*
* @var array
*/
public static $rules
= [
'name' => 'required',
];
public function pirep()
{
return $this->belongsTo('App\Models\Pirep', 'pirep_id');
}
}