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(); }); }
/** * Remove the specified podscheduleexception from storage. * * @param int $id * @return Response */ public function destroy($id) { PodScheduleException::destroy($id); return Redirect::route('pod_schedule_exceptions.index'); }