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
435979b0
Commit
435979b0
authored
3 years ago
by
Guilherme Silva
Browse files
Options
Download
Email Patches
Plain Diff
Adicionada relações de notificação
parent
545187d1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/Trabalho.php
+3
-0
app/Trabalho.php
app/User.php
+4
-0
app/User.php
with
7 additions
and
0 deletions
+7
-0
app/Trabalho.php
View file @
435979b0
...
...
@@ -106,4 +106,7 @@ class Trabalho extends Model
return
$this
->
hasMany
(
ParecerInterno
::
class
,
'trab_id'
,
'id'
);
}
public
function
notificacoes
(){
return
$this
->
hasMany
(
Notificacao
::
class
,
'trabalho_id'
,
'id'
);
}
}
This diff is collapsed.
Click to expand it.
app/User.php
View file @
435979b0
...
...
@@ -106,4 +106,8 @@ class User extends Authenticatable implements MustVerifyEmail
$this
->
notify
(
new
VerifyNotification
());
}
public
function
notificacoes
(){
return
$this
->
hasMany
(
Notificacao
::
class
,
'destinatario_id'
)
->
orderBy
(
'created_at'
,
'desc'
)
->
take
(
5
);
}
}
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