'Retrieve Notifications', 'message' => 'You have successfully retrieved a list of Notifications' ]; } /** @var ListsNotification */ private $listsNotification; /** * ListNotificationsLogic constructor. * @param ListsNotification $listsNotification */ public function __construct( ListsNotification $listsNotification ) { $this->listsNotification = $listsNotification; } /** * @param Request $request * @return JsonResponse * @throws \App\Classes\Exceptions\AccessForbiddenException * @throws \App\Classes\Exceptions\MalformedRequestException * @throws \App\Classes\Exceptions\RequestValidationException */ public function logic(Request $request) : JsonResponse { $filters = [ // 'target_id'=>auth()->user()->id, // 'per_page'=>$request->route('per_page') ]; $notifications = $this->listsNotification->execute($filters); return $this->collectionResponse(NotificationResource::collection($notifications)); } }