fixed notification query
This commit is contained in:
parent
aad691c5ae
commit
1b7f7ac34e
@ -57,8 +57,10 @@ class Exports extends Component
|
|||||||
protected function getNotifications($limit = false)
|
protected function getNotifications($limit = false)
|
||||||
{
|
{
|
||||||
$query = user()->notifications()->unread()
|
$query = user()->notifications()->unread()
|
||||||
->where('type', 'App\Notifications\Common\ExportCompleted')
|
->where(function ($query) {
|
||||||
->where('type', 'App\Notifications\Common\ExportFailed');
|
$query->where('type', 'App\Notifications\Common\ExportCompleted')
|
||||||
|
->orWhere('type', 'App\Notifications\Common\ExportFailed');
|
||||||
|
});
|
||||||
|
|
||||||
if ($limit) {
|
if ($limit) {
|
||||||
$notifications = $query->paginate($limit);
|
$notifications = $query->paginate($limit);
|
||||||
|
@ -57,8 +57,10 @@ class Imports extends Component
|
|||||||
protected function getNotifications($limit = false)
|
protected function getNotifications($limit = false)
|
||||||
{
|
{
|
||||||
$query = user()->notifications()->unread()
|
$query = user()->notifications()->unread()
|
||||||
->where('type', 'App\Notifications\Common\ImportCompleted')
|
->where(function ($query) {
|
||||||
->where('type', 'App\Notifications\Common\ImportFailed');
|
$query->where('type', 'App\Notifications\Common\ImportCompleted')
|
||||||
|
->orWhere('type', 'App\Notifications\Common\ImportFailed');
|
||||||
|
});
|
||||||
|
|
||||||
if ($limit) {
|
if ($limit) {
|
||||||
$notifications = $query->paginate($limit);
|
$notifications = $query->paginate($limit);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user