This commit is contained in:
sayaliparab
2024-07-10 14:53:23 +05:30
parent 06a85d5693
commit 728f1fbceb
2 changed files with 16 additions and 3 deletions

View File

@@ -26,6 +26,7 @@ class ManageNotificationsController extends Controller
if ($activeQuery == 4) { // for customer
$notifications = NotificationDetails::with('Notification')
->where('is_active', 1)
->whereHas('Notification', function ($query) {
$query->where('principal_type_xid', 3);
})
@@ -34,6 +35,7 @@ class ManageNotificationsController extends Controller
->get();
} else if ($activeQuery == 3) { // for restaurant
$notifications = NotificationDetails::with('Notification')
->where('is_active', 1)
->whereHas('Notification', function ($query) {
$query->where('principal_type_xid', 4);
})
@@ -44,6 +46,7 @@ class ManageNotificationsController extends Controller
// return $notifications;
} else {
$notificationsOfType3 = NotificationDetails::with('Notification')
->where('is_active', 1)
->whereHas('Notification', function ($query) {
$query->where('principal_type_xid', 3);
})
@@ -52,6 +55,7 @@ class ManageNotificationsController extends Controller
->get();
$notificationsOfType4 = NotificationDetails::with('Notification')
->where('is_active', 1)
->whereHas('Notification', function ($query) {
$query->where('principal_type_xid', 4);
})