callApiService = $callApiService; $this->iammgoService = $iammgoService; } public function show($id) { $limit = (int)request('limit', 10); $page = (int)request('page', 1); $postDetailsBook = $this->iammgoService->getPostDetailsBook($id, $limit, $page); if ($this->callApiService->verifyApiError($postDetailsBook)) { notify()->error($postDetailsBook['body'], 'Error', 'bottomRight'); return redirect()->to('/'); } $event = $postDetailsBook['PostDetailsPage'][0]; if ($event['AttachedFiles']) { $event['AttachedFiles'] = explode('|', $event['AttachedFiles']); } else { $event['AttachedFiles'] = []; } $postDetailsBook['PostBdPage'] = new LengthAwarePaginator($postDetailsBook['PostBdPage'], $postDetailsBook['PostBdPageVars']['QueryCnt'], $limit, $page, ['path' => request()->url()]); // dd($event); return view('views.page.status-details', compact('event', 'postDetailsBook'))->with('codeTitle', [ "status('post-event')", ]); } }