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
80534357
Unverified
Commit
80534357
authored
Aug 22, 2022
by
GuilhermeGz
Committed by
GitHub
Aug 22, 2022
Browse files
Merge pull request #571 from antonioDurval/master
Restrição que impede o usuário de submeter uma proposta sem discente
parents
a0d90418
de60f2f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Requests/StoreTrabalho.php
View file @
80534357
...
...
@@ -30,6 +30,10 @@ class StoreTrabalho extends FormRequest
//dd($this->all());
$evento
=
Evento
::
find
(
$this
->
editalId
);
$rules
=
[];
if
(
!
(
$this
->
has
(
'marcado'
))){
$rules
[
'erro'
]
=
[
'required'
];
}
if
(
$this
->
has
(
'marcado'
)){
foreach
(
$this
->
get
(
'marcado'
)
as
$key
=>
$value
)
{
if
(
intval
(
$value
)
==
$key
){
...
...
@@ -65,7 +69,7 @@ class StoreTrabalho extends FormRequest
}
if
(
$this
->
has
(
'rascunho'
))
{
if
(
$this
->
has
(
'rascunho'
))
{
$rules
=
[];
return
$rules
;
}
else
{
...
...
app/Http/Requests/UpdateTrabalho.php
View file @
80534357
...
...
@@ -32,6 +32,9 @@ class UpdateTrabalho extends FormRequest
$projeto
=
Trabalho
::
find
(
$this
->
id
);
$evento
=
Evento
::
find
(
$this
->
editalId
);
if
(
!
(
$this
->
has
(
'marcado'
))){
$rules
[
'erro'
]
=
[
'required'
];
}
if
(
$this
->
has
(
'marcado'
)){
foreach
(
$this
->
get
(
'marcado'
)
as
$key
=>
$value
)
{
if
(
intval
(
$value
)
==
$key
){
...
...
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