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
f06d9de5
Commit
f06d9de5
authored
Jul 02, 2021
by
Gabriel-31415
Browse files
ajuste
parent
2593515b
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/CoordenadorComissao.php
View file @
f06d9de5
...
...
@@ -15,7 +15,7 @@ class CoordenadorComissao extends Model
}
public
function
trabalho
(){
return
$this
->
hasMany
(
'App\Trabalho'
);
return
$this
->
hasMany
(
'App\Trabalho'
,
'coordenador_id'
);
}
}
app/Http/Controllers/TrabalhoController.php
View file @
f06d9de5
...
...
@@ -317,7 +317,12 @@ class TrabalhoController extends Controller
{
$projeto
=
Auth
::
user
()
->
proponentes
->
trabalhos
()
->
where
(
'id'
,
$id
)
->
first
();
if
(
Auth
::
user
()
->
tipo
==
'administrador'
){
$projeto
=
Trabalho
::
find
(
$id
);
}
if
(
!
$projeto
){
// $projeto = Auth::user()->coordenadorComissao->trabalho()->where('id', $id)->first();
return
back
()
->
withErrors
([
'Proposta não encontrada!'
]);
}
$edital
=
Evento
::
find
(
$projeto
->
evento_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