phpvms/app/Models/PirepEvent.php
2017-07-23 13:07:41 -05:00

48 lines
739 B
PHP

<?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');
}
}