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
04a775ec
"app/Http/vscode:/vscode.git/clone" did not exist on "d8e2596f9567f26f3d6255bbfa7cff7cb69b8f0e"
Commit
04a775ec
authored
Mar 17, 2022
by
Guilherme Silva
Browse files
Mudanças na forma de criação da documentação complementar
parent
743a0f82
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/DocumentacaoComplementarController.php
View file @
04a775ec
...
...
@@ -17,9 +17,10 @@ class DocumentacaoComplementarController extends Controller
$docComp
=
DocumentacaoComplementar
::
find
(
$request
->
docId
);
}
else
{
$docComp
=
new
DocumentacaoComplementar
;
$docComp
->
save
();
}
$pasta
=
'docComplementar/'
.
Auth
::
user
()
->
id
;
$pasta
=
'docComplementar/'
.
$docComp
->
id
;
$docComp
->
termoCompromisso
=
Storage
::
putFileAs
(
$pasta
,
$request
->
termoCompromisso
,
"Termo De Compromisso.pdf"
);
$docComp
->
comprovanteMatricula
=
Storage
::
putFileAs
(
$pasta
,
$request
->
comprovanteMatricula
,
"Comprovante De Matricula.pdf"
);
...
...
@@ -27,11 +28,9 @@ class DocumentacaoComplementarController extends Controller
$docComp
->
termoCompromisso
=
Storage
::
putFileAs
(
$pasta
,
$request
->
termoCompromisso
,
"TermoDeCompromisso.pdf"
);
$docComp
->
participante_id
=
$request
->
partcipanteId
;
$docComp
->
linkLattes
=
$request
->
linkLattes
;
if
(
$request
->
docId
!=
null
){
$docComp
->
update
();
}
else
{
$docComp
->
save
();
}
return
redirect
()
->
back
()
->
with
([
'sucesso'
=>
"Documentação complementar enviada com sucesso"
]);
...
...
database/migrations/2022_02_22_094237_create_documentacao_complementars_table.php
View file @
04a775ec
...
...
@@ -15,10 +15,10 @@ class CreateDocumentacaoComplementarsTable extends Migration
{
Schema
::
create
(
'documentacao_complementars'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'termoCompromisso'
);
$table
->
string
(
'comprovanteMatricula'
);
$table
->
string
(
'pdfLattes'
);
$table
->
string
(
'linkLattes'
);
$table
->
string
(
'termoCompromisso'
)
->
nullable
()
;
$table
->
string
(
'comprovanteMatricula'
)
->
nullable
()
;
$table
->
string
(
'pdfLattes'
)
->
nullable
()
;
$table
->
string
(
'linkLattes'
)
->
nullable
()
;
$table
->
integer
(
'participante_id'
)
->
nullable
();
$table
->
foreign
(
'participante_id'
)
->
references
(
'id'
)
->
on
(
'participantes'
);
...
...
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