Stevemo\Cpanel\Controllers\PermissionsController::update PHP Метод

update() публичный Метод

Process the edit form
Автор: Steve Montambeault
public update ( $id ) : Illuminate\Http\RedirectResponse
$id
Результат Illuminate\Http\RedirectResponse
    public function update($id)
    {
        $inputs = Input::all();
        $inputs['id'] = $id;
        try {
            if ($this->form->update($inputs)) {
                return Redirect::route('cpanel.permissions.index')->with('success', Lang::get('cpanel::permissions.update_success'));
            }
            return Redirect::back()->withInput()->withErrors($this->form->getErrors());
        } catch (PermissionNotFoundException $e) {
            return Redirect::route('cpanel.permissions.index')->with('error', Lang::get('cpanel::permissions.model_not_found'));
        }
    }