$category = Category::first(); $apps = $category->apps()->paginate(10); return view('example', compact('category', 'apps'));
public function index() { $users = DB::table('users')->paginate(15); return view('user.index', ['users' => $users]); }
@foreach ($apps as $app) {{ $app->id }} @endforeach {!! $apps->render() !!}