render('credits.index'); } public function show(ShowCreditRequest $request, Credit $credit) { set_time_limit(0); $invitation = $credit->invitations()->where('client_contact_id', auth()->user()->id)->first(); $data = [ 'credit' => $credit, 'key' => $invitation ? $invitation->key : false, ]; if ($invitation && auth()->guard('contact') && ! request()->has('silent') && ! $invitation->viewed_date) { $invitation->markViewed(); event(new InvitationWasViewed($credit, $invitation, $credit->company, Ninja::eventVars())); event(new CreditWasViewed($invitation, $invitation->company, Ninja::eventVars())); } if ($request->query('mode') === 'fullscreen') { return render('credits.show-fullscreen', $data); } return $this->render('credits.show', $data); } }