From a595fef287e87988075dd16bfcf53bdc8d8d7f6f Mon Sep 17 00:00:00 2001 From: Guilherme Silva Date: Sat, 4 Jun 2022 14:22:37 -0300 Subject: [PATCH] =?UTF-8?q?Ajuste=20na=20verifica=C3=A7=C3=A3o=20de=20exis?= =?UTF-8?q?tencia=20de=20plano=20de=20trablho=20do=20particiapente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/TrabalhoController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/TrabalhoController.php b/app/Http/Controllers/TrabalhoController.php index 582ec1a..8336fa0 100755 --- a/app/Http/Controllers/TrabalhoController.php +++ b/app/Http/Controllers/TrabalhoController.php @@ -918,7 +918,7 @@ class TrabalhoController extends Controller } if ($request->has('anexoPlanoTrabalho') && array_key_exists($part, $request->anexoPlanoTrabalho) && $request->nomePlanoTrabalho[$part] != null) { - if (Arquivo::where('participanteId', $participante->id)->count()) { + if (Arquivo::where('participanteId', $participante->id)->where('trabalhoId', $trabalho->id)->count()) { $arquivo = Arquivo::where('participanteId', $participante->id)->where('trabalhoId', $trabalho->id)->first(); $path = 'trabalhos/' . $evento->id . '/' . $trabalho->id . '/'; $nome = $data['nomePlanoTrabalho'] . ".pdf"; -- GitLab