public function postEditTemplate() { try { $input = Input::all(); $template = SchemaTemplate::findOrFail($input['id']); $template->fill($input); $this->flash($template->save()); return Redirect::route('schematemplate.index'); } catch (Illuminate\Database\Eloquent\ModelNotFoundException $e) { App::abort(404); } }