Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
submeta
Commits
cb756731
Commit
cb756731
authored
Nov 15, 2022
by
Lucas Henrique
Browse files
Resolvendo problema ao editar um projeto sem discente
parent
ddb016c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
cb756731
...
@@ -869,27 +869,29 @@ class TrabalhoController extends Controller
...
@@ -869,27 +869,29 @@ class TrabalhoController extends Controller
$trabalho
=
$this
->
armazenarAnexosFinais
(
$request
,
$pasta
,
$trabalho
,
$evento
);
$trabalho
=
$this
->
armazenarAnexosFinais
(
$request
,
$pasta
,
$trabalho
,
$evento
);
$trabalho
->
save
();
$trabalho
->
save
();
if
(
$request
->
marcado
==
null
)
{
if
(
$evento
->
numParticipantes
!=
0
)
{
$idExcluido
=
$trabalho
->
participantes
->
pluck
(
'id'
);
if
(
$request
->
marcado
==
null
)
{
$idExcluido
=
$trabalho
->
participantes
->
pluck
(
'id'
);
}
else
{
$idExcluido
=
[];
}
else
{
}
$idExcluido
=
[];
foreach
(
$request
->
participante_id
as
$key
=>
$value
)
{
if
(
$request
->
marcado
!=
null
&&
array_search
(
$key
,
$request
->
marcado
)
===
false
)
{
if
(
$value
!==
null
)
array_push
(
$idExcluido
,
$value
);
}
}
foreach
(
$request
->
participante_id
as
$key
=>
$value
)
{
if
(
$request
->
marcado
!=
null
&&
array_search
(
$key
,
$request
->
marcado
)
===
false
)
{
if
(
$value
!==
null
)
array_push
(
$idExcluido
,
$value
);
}
}
foreach
(
$idExcluido
as
$key
=>
$value
)
{
$trabalho
->
participantes
()
->
find
(
$value
)
->
delete
();
}
$trabalho
->
refresh
();
}
}
foreach
(
$idExcluido
as
$key
=>
$value
)
{
$trabalho
->
participantes
()
->
find
(
$value
)
->
delete
();
}
$trabalho
->
refresh
();
if
(
$request
->
has
(
'marcado'
))
{
if
(
$request
->
has
(
'marcado'
))
{
foreach
(
$request
->
marcado
as
$key
=>
$part
)
{
foreach
(
$request
->
marcado
as
$key
=>
$part
)
{
$part
=
intval
(
$part
);
$part
=
intval
(
$part
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment