Esempio n. 1
0
 public function show($id)
 {
     $event = Event::chosen($id);
     switch ($event->type) {
         case "photo":
             return view('Photos.photos', compact('event'));
             break;
         case "party":
             return view('ChildrensParty.create', compact('event'));
             break;
     }
 }
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store($id, PartyRegistrationRequest $request)
 {
     $event = Event::chosen($id);
     $id = $event->parties()->create($request->all());
     return redirect()->action('ChildrenRegistrationController@show', [$id]);
 }
Esempio n. 3
0
 public function store($id, AddPhotoRequest $request)
 {
     $event = Event::chosen($id);
     $photo = $request->file('file');
     (new AddPhotoToEvent($event, $photo))->save();
 }