/** * Update the specified resource in storage. * * @param $company * @return Response */ public function postEdit($model) { $title = 'Edit ' . ucfirst($this->singleName) . ' Details - ' . $model->name; $controller = $this->name; $input_validation = $this->validateModel(); if ($input_validation !== true) { $this->populateForm(); Former::withErrors($input_validation); return View::make('site/' . $this->name . '/edit', compact('title', 'model', 'controller'))->with('error', 'Not saved!'); } $this->saveModel($model); $this->populateForm($model); return View::make('site/' . $this->name . '/edit', compact('title', 'model', 'controller'))->with('success', 'Saved!'); }