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
e03d1062
Commit
e03d1062
authored
Nov 05, 2022
by
unknown
Browse files
criando novas funções nos models
parent
a49e928f
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Avaliador.php
View file @
e03d1062
...
...
@@ -34,4 +34,7 @@ class Avaliador extends Model
return
$this
->
hasMany
(
ParecerInterno
::
class
,
'avali_id'
,
'id'
);
}
public
function
naturezas
(){
return
$this
->
belongsToMany
(
'App\Natureza'
,
'naturezas_avaliadors'
,
'avaliador_id'
);
}
}
app/Natureza.php
View file @
e03d1062
...
...
@@ -9,4 +9,8 @@ class Natureza extends Model
public
function
projetos
()
{
return
$this
->
hasMany
(
'App\Evento'
);
}
public
function
avaliadors
(){
return
$this
->
belongsToMany
(
'App\Avaliador'
,
'naturezas_avaliadors'
,
'natureza_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