Commit f9c0e4eb authored by Lucas Henrique's avatar Lucas Henrique
Browse files

Soluciona erro ao editar um projeto sem alterar o nome do Plano de Trabalho

parent 8739a623
...@@ -1033,7 +1033,9 @@ class TrabalhoController extends Controller ...@@ -1033,7 +1033,9 @@ class TrabalhoController extends Controller
$file = $request->anexoPlanoTrabalho; $file = $request->anexoPlanoTrabalho;
Storage::putFileAs($path, $file, $nome); Storage::putFileAs($path, $file, $nome);
} else { } else {
Storage::rename( $arquivo->nome, $path.$nome ); if($arquivo->nome != $path.$nome) {
Storage::rename( $arquivo->nome, $path.$nome );
}
} }
$arquivo->update([ $arquivo->update([
'titulo' => $titulo, 'titulo' => $titulo,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment