public function sheet($leadership_event_id, $activity_id) { $event = LeadershipEvent::findOrFail($leadership_event_id); $activity = Activity::findOrFail($activity_id); $this->layout->with('subtitle', $event->name()); $this->layout->content = View::make('signup.sheet')->with('event', $event)->with('activity', $activity); }
public function update($leadership_event_id, $id) { $input = Input::all(); $validator = Validator::make($input, Activity::$rules, Activity::$messages); if ($validator->passes()) { $activity = Activity::findOrFail($id); $activity->update($input); $activity->save(); return Redirect::route('activity.show', array($leadership_event_id, $id)); } return Redirect::route('activity.edit', array($leadership_event_id, $id))->withInput()->withErrors($validator); }
public function show($id) { $activity = Activity::findOrFail($id); return View::make('activities.show', compact('activity')); }