Example #1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($eventSlug)
 {
     $event = Event::findBySlugOrIdOrFail($eventSlug);
     if ($event->user->id != Auth::user()->id) {
         return abort(404, "Sorry, We couldn't find what you're looking for");
     }
     return view('event.dashboard')->with(compact('event'));
 }
Example #2
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create($eventSlug)
 {
     $event = Event::findBySlugOrIdOrFail($eventSlug);
     $menu = $this->menu->newInstance();
     return view('menu.create')->with(compact('event', 'menu'));
 }