authorize('view', 'billings'); $billings = Billing::latest('id') ->paginate(config(50)); $currency = Currency::latest()->first(); return view('dashboard.billing.index', compact('billings', 'currency')); } /** * @param Request $request * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function search(Request $request) { $id = $request->get('query'); $billings = Billing::where('id', $id)->orWhere('transaction_id', $id)->paginate(50); return view('dashboard.billing.index', compact('billings')); } }