'integer', 'flight_id' => 'string', 'aircraft_id' => 'integer', 'flight_time' => 'integer', 'level' => 'integer', 'route' => 'string', 'notes' => 'string', 'raw_data' => 'string', ]; /** * Validation rules * * @var array */ public static $rules = [ 'dpt_airport_id' => 'required', 'arr_airport_id' => 'required', ]; /** * Foreign Keys */ public function arr_airport() { return $this->belongsTo('App\Models\Airport', 'arr_airport_id'); } public function dpt_airport() { return $this->belongsTo('App\Models\Airport', 'dpt_airport_id'); } public function fields() { return $this->hasMany('App\Models\PirepFieldValues', 'pirep_id'); } public function flight() { return $this->belongsTo('App\Models\Flight', 'flight_id'); } public function user() { return $this->belongsTo('App\Models\User', 'user_id'); } }