Ejemplo n.º 1
0
 public static function boot()
 {
     parent::boot();
     static::deleted(function ($pod) {
         PodBattery::destroy($pod->batteries()->lists('id'));
         PodUp::destroy($pod->ups()->lists('id'));
         Cord::destroy($pod->cords()->lists('id'));
     });
 }
Ejemplo n.º 2
0
 /**
  * Remove the specified podbattery from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     PodBattery::destroy($id);
     return Redirect::route('pod_batteries.index');
 }