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
1c991cce
"database/seeders/UsuarioSeeder.php" did not exist on "266c1ff11f550577ff25ea21d78c6f79385a9931"
Commit
1c991cce
authored
Aug 31, 2022
by
GuilhermeGz
Browse files
Recuperação de plano de trabalho na edição de proposta
parent
8a62e11f
Changes
1
Show whitespace changes
Inline
Side-by-side
app/Http/Requests/UpdateTrabalho.php
View file @
1c991cce
...
...
@@ -38,6 +38,11 @@ class UpdateTrabalho extends FormRequest
if
(
$this
->
has
(
'marcado'
)){
foreach
(
$this
->
get
(
'marcado'
)
as
$key
=>
$value
)
{
if
(
intval
(
$value
)
==
$key
){
$participante
=
null
;
if
(
$this
->
participante_id
[
$value
]
!=
null
){
$participante
=
Participante
::
find
(
$this
->
participante_id
[
$value
]);
}
//user
$rules
[
'name.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'email.'
.
$value
]
=
[
'required'
,
'string'
];
...
...
@@ -63,12 +68,19 @@ class UpdateTrabalho extends FormRequest
$rules
[
'media_do_curso.'
.
$value
]
=
[
'required'
,
'string'
];
}
$rules
[
'nomePlanoTrabalho.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
'required'
,
'mimes:pdf'
];
if
(
$participante
!=
null
){
$arquivo
=
Arquivo
::
where
(
'participanteId'
,
$participante
->
id
)
->
where
(
'trabalhoId'
,
$projeto
->
id
)
->
first
();
if
(
$arquivo
==
null
||
$this
->
nomePlanoTrabalho
[
$value
]
!=
$arquivo
->
titulo
){
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
'required'
,
'mimes:pdf'
];
}
}
else
{
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
'required'
,
'mimes:pdf'
];
}
}
}
}
// dd($this->all());
if
(
$this
->
has
(
'rascunho'
))
{
$rules
=
[];
...
...
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