Add relationship to pull ACARS log messages

This commit is contained in:
Nabeel Shahzad 2018-01-03 22:19:06 -06:00
parent 8810f03c29
commit 676a310432

View File

@ -93,6 +93,13 @@ class Pirep extends BaseModel
->orderBy('created_at', 'asc');
}
public function acars_logs()
{
return $this->hasMany('App\Models\Acars', 'pirep_id')
->where('type', AcarsType::LOG)
->orderBy('created_at', 'asc');
}
public function acars_route()
{
return $this->hasMany('App\Models\Acars', 'pirep_id')