Commit a595fef2 authored by Guilherme Silva's avatar Guilherme Silva
Browse files

Ajuste na verificação de existencia de plano de trablho do particiapente

parent 5d8cef8f
......@@ -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";
......
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