/** * Update the specified resource in storage. * PUT /projects/{id} * * @param Project $project * @return Response */ public function update(Project $project) { $input = array_except(Input::all(), '_method'); $project->fill($input); if ($project->updateUniques()) { return Redirect::route('projects.show', $project->slug)->with('message', 'Project updated.'); } else { return Redirect::route('projects.edit', array_get($project->getOriginal(), 'slug'))->withInput()->withErrors($project->errors()); } }