/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($slug, $id) { $event = Event::findBySlug($slug); if ($id == 'self') { if (\Auth::check()) { EventRegistration::where('user_id', '=', \Auth::id())->where('event_id', '=', $event->id)->delete(); } } else { EventRegistration::destroy($id); } }