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
4d3caf18
"resources/views/vscode:/vscode.git/clone" did not exist on "1b68d03e6d73f07b0635728d0e93d5b4f0762a0b"
Commit
4d3caf18
authored
Feb 13, 2022
by
Guilherme Silva
Browse files
Ajustes na ordenação de exibição de mensagens
parent
76c94280
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/NotificacaoController.php
View file @
4d3caf18
...
@@ -85,7 +85,7 @@ class NotificacaoController extends Controller
...
@@ -85,7 +85,7 @@ class NotificacaoController extends Controller
public
function
listar
()
public
function
listar
()
{
{
$notificacoes
=
Notificacao
::
all
()
->
sortBy
(
'created_at'
);
$notificacoes
=
Notificacao
::
all
()
->
sortBy
Desc
(
'created_at'
);
return
view
(
'notificacao.listar'
,[
'notificacoes'
=>
$notificacoes
]);
return
view
(
'notificacao.listar'
,[
'notificacoes'
=>
$notificacoes
]);
}
}
...
@@ -93,7 +93,7 @@ class NotificacaoController extends Controller
...
@@ -93,7 +93,7 @@ class NotificacaoController extends Controller
{
{
$destinatarios
=
Notificacao
::
where
(
'destinatario_id'
,
Auth
()
->
user
()
->
id
)
->
get
();
$destinatarios
=
Notificacao
::
where
(
'destinatario_id'
,
Auth
()
->
user
()
->
id
)
->
get
();
$remetentes
=
Notificacao
::
where
(
'remetente_id'
,
Auth
()
->
user
()
->
id
)
->
get
();
$remetentes
=
Notificacao
::
where
(
'remetente_id'
,
Auth
()
->
user
()
->
id
)
->
get
();
$notificacoes
=
$destinatarios
->
merge
(
$remetentes
);
$notificacoes
=
$destinatarios
->
merge
(
$remetentes
)
->
sortByDesc
(
'created_at'
)
;
return
view
(
'notificacao.listar'
,[
'notificacoes'
=>
$notificacoes
]);
return
view
(
'notificacao.listar'
,[
'notificacoes'
=>
$notificacoes
]);
}
}
}
}
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