flashInput($request->post('old',[])); return view('theme.backend.adminlte.payment.widget.invoices') ->with('pid',$request->post('pid')) ->with('o',Account::findOrFail($request->post('aid'))); } /** * Return the invoice in PDF format, ready to download * * @param Invoice $o * @return mixed */ public function pdf(Invoice $o) { return PDF::loadView('theme.backend.adminlte.u.invoice.home',['o'=>$o]) ->stream(sprintf('%s.pdf',$o->sid)); } /** * Render a specific invoice for the user * * @param Invoice $o * @param string|null $code * @return View */ public function view(Invoice $o,string $code=NULL): View { if ($code) { try { Doorman::redeem($code,$o->account->user->email); } catch (ExpiredInviteCode|InvalidInviteCode|NotYourInviteCode $e) { abort(404); } } return view('theme.backend.adminlte.invoice.view') ->with('o',$o); } }