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