Example #1
0
 public static function boot()
 {
     parent::boot();
     static::deleted(function ($pod) {
         PodScheduleGroup::destroy($pod->groupSchedules()->lists('id'));
         PodScheduleException::destroy($pod->expSchedules()->lists('id'));
         PodInventory::where('pod_api_id', '=', $pod->id)->delete();
     });
 }