Set airport and landing time of aircraft after pirep accept #112

This commit is contained in:
Nabeel Shahzad
2018-01-10 12:39:13 -06:00
parent 2f33c7b6aa
commit dce9723979
5 changed files with 47 additions and 5 deletions

View File

@@ -267,6 +267,11 @@ class PIREPService extends BaseService
Log::info('PIREP ' . $pirep->id . ' state change to ACCEPTED');
# Update the aircraft
$pirep->aircraft->airport_id = $pirep->arr_airport_id;
$pirep->aircraft->landing_time = $pirep->updated_at;
$pirep->aircraft->save();
event(new PirepAccepted($pirep));
return $pirep;