Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
88c34dc4
Commit
88c34dc4
authored
4 years ago
by
alinetenorio
Browse files
Options
Download
Email Patches
Plain Diff
ajustes validação
parent
562de730
master
beta
carl-branch
carlos
dependabot/composer/dompdf/dompdf-1.2.2
dependabot/composer/guzzlehttp/guzzle-6.5.8
dependabot/composer/guzzlehttp/psr7-1.8.5
dependabot/composer/symfony/http-kernel-4.4.50
dependabot/npm_and_yarn/axios-0.21.2
dependabot/npm_and_yarn/decode-uri-component-0.2.2
dependabot/npm_and_yarn/express-4.18.2
dependabot/npm_and_yarn/json5-and-json5-2.2.3
dependabot/npm_and_yarn/loader-utils-and-webpack-cli-1.4.2
dependabot/npm_and_yarn/minimist-and-mkdirp-1.2.8
dependabot/npm_and_yarn/qs-and-express-6.11.0
editarProjeto
excluir_projeto_submetido
fixCorrecoes
fixQtdParticipante
fixRascunho
master-test
minha_conta
modificacoes_aviso
modificacoes_layout_6
modificacoes_layout_7
modificacoes_layout_8
modificacoes_layout_9
modificacoes_layout_igor
modificacoes_layout_minha_conta
modificacoes_perfil_avaliador
updates_mar
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/Http/Controllers/TrabalhoController.php
+12
-9
app/Http/Controllers/TrabalhoController.php
with
12 additions
and
9 deletions
+12
-9
app/Http/Controllers/TrabalhoController.php
View file @
88c34dc4
...
...
@@ -127,21 +127,24 @@ class TrabalhoController extends Controller
'justificativaAutorizacaoEtica'
=>
[(
$request
->
anexoJustificativaPreenchido
!==
'sim'
&&
$request
->
anexoComitePreenchido
!==
'sim'
?
'required_without:anexoComiteEtica'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoLattesCoordenador'
=>
[(
$request
->
anexoLattesPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
//
'anexoPlanilha' => [($request->anexoPlanilhaPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf,xls', 'max:2000000'],
'anexoPlanilha'
=>
[(
$request
->
anexoPlanilhaPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf,xls
,xlsx
'
,
'max:2000000'
],
'anexoPlanoTrabalho.*'
=>
[
'nullable'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
]);
//dd($request->all());
$extensions
=
array
(
"xls"
,
"xlsx"
);
$result
=
array
(
$request
->
file
(
'anexoPlanilha'
)
->
getClientOriginalExtension
());
if
(
in_array
(
$result
[
0
],
$extensions
)){
// $extensions = array("xls","xlsx");
// if(isset($request->anexoPlanilha )){
// $result = array($request->file('anexoPlanilha')->getClientOriginalExtension());
// if(in_array($result[0], $extensions)){
// }else{
// $validatedData = $request->validate([
// 'anexoPlanilha' => [($request->anexoPlanilhaPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf,xls,xlsx', 'max:2000000']
// ]);
// }
// }
}
else
{
$validatedData
=
$request
->
validate
([
'anexoPlanilha'
=>
[(
$request
->
anexoPlanilhaPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:xls, xlsx'
,
'max:2000000'
]
]);
}
//$trabalho = Trabalho::create([
$trabalho
[
'titulo'
]
=
$request
->
nomeProjeto
;
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help