I have this code:
$transactions = DB::table('transactions')
->join('orders', 'transactions.order_id', '=', 'orders.id')
->get()->paginate(5);
return view('transactions.index', ['transactions' => $transactions]);
the code result in this error:
Method Illuminate\Support\Collection::paginate does not exist
->get()returns collection while->paginate()asks for query builder. - Tpojka