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
86fcbda1
Unverified
Commit
86fcbda1
authored
May 12, 2023
by
Yuri Resende
Committed by
GitHub
May 12, 2023
Browse files
Merge pull request #835 from yuriresendematias/master
Correção para atualização dos cadastros de participantes
parents
26c8eafe
feb1fe31
Changes
1
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/UserController.php
View file @
86fcbda1
...
@@ -250,6 +250,18 @@ class UserController extends Controller
...
@@ -250,6 +250,18 @@ class UserController extends Controller
$id
=
Auth
::
user
()
->
id
;
$id
=
Auth
::
user
()
->
id
;
$user
=
User
::
find
(
$id
);
$user
=
User
::
find
(
$id
);
$cursoPart
=
null
;
$cursoPart
=
null
;
if
(
$user
->
participantes
()
->
first
()
==
null
){
$participante
=
Participante
::
create
();
$user
->
participantes
()
->
save
(
$participante
);
}
if
(
$user
->
endereco
()
->
first
()
==
null
){
$endereco
=
Endereco
::
create
();
$endereco
->
user
()
->
save
(
$user
);
}
if
(
$user
->
participantes
()
->
exists
()
&&
$user
->
participantes
()
->
first
()
->
curso_id
)
if
(
$user
->
participantes
()
->
exists
()
&&
$user
->
participantes
()
->
first
()
->
curso_id
)
$cursoPart
=
Curso
::
find
(
$user
->
participantes
()
->
first
()
->
curso_id
);
$cursoPart
=
Curso
::
find
(
$user
->
participantes
()
->
first
()
->
curso_id
);
...
...
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