Exemple #1
0
 public static function boot()
 {
     parent::boot();
     static::deleted(function ($group) {
         Schedule::destroy($group->schedules()->lists('id'));
     });
 }
 /**
  * Remove the specified schedule from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Schedule::destroy($id);
     return Redirect::route('schedules.index');
 }