Add relationship to pull ACARS log messages
This commit is contained in:
parent
8810f03c29
commit
676a310432
@ -93,6 +93,13 @@ class Pirep extends BaseModel
|
|||||||
->orderBy('created_at', 'asc');
|
->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()
|
public function acars_route()
|
||||||
{
|
{
|
||||||
return $this->hasMany('App\Models\Acars', 'pirep_id')
|
return $this->hasMany('App\Models\Acars', 'pirep_id')
|
||||||
|
Loading…
Reference in New Issue
Block a user