Refactorred Notification package

This commit is contained in:
jitendra 2022-09-23 13:48:36 +05:30
parent b701e0a600
commit 44550ddd82
4 changed files with 8 additions and 9 deletions

View File

@ -23,7 +23,7 @@ class CreateOrderNotification implements ShouldBroadcast
}
/**
* Seperate queue.
* Separate queue.
*
* Command: `php artisan queue:work --queue=broadcastable`
*

View File

@ -42,7 +42,7 @@ class UpdateOrderNotification implements ShouldBroadcast
}
/**
* Seperate queue.
* Separate queue.
*
* Command: `php artisan queue:work --queue=broadcastable`
*

View File

@ -60,7 +60,7 @@ class NotificationController extends Controller
}
/**
* Update the notification is readed or not.
* Update the notification is reade or not.
*
* @param int $orderId
* @return \Illuminate\View\View
@ -79,7 +79,7 @@ class NotificationController extends Controller
}
/**
* Update the notification is readed or not.
* Update the notification is reade or not.
*
* @return array
*/
@ -87,12 +87,10 @@ class NotificationController extends Controller
{
$this->notificationRepository->where('read', 0)->update(['read' => 1]);
$params = [
$searchResults = $this->notificationRepository->getParamsData([
'limit' => 5,
'read' => 0,
];
$searchResults = $this->notificationRepository->getParamsData($params);
]);
return [
'search_results' => $searchResults,

View File

@ -19,7 +19,8 @@ class NotificationRepository extends Repository
/**
* Return Filtered Notification resources
*
* @return objects
* @param array $params
* @return array
*/
public function getParamsData($params)
{