FAQ_sub
This commit is contained in:
@@ -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);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user