Esempio 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'));
     });
 }
Esempio n. 2
0
 /**
  * Remove the specified podup from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     PodUp::destroy($id);
     return Redirect::route('pod_ups.index');
 }