public function atualizar() { try { $validacao = Marca::validar(request()->all()); if ($validacao->fails()) { return redirect()->route('marca.editar', ['id' => request()->get('id')])->withErrors($validacao)->withInput(); } Marca::atualizar(request()); return redirect()->route('marca.index'); } catch (\Exception $e) { return $e->getMessage(); } }