Marion Hulse
0
Q:

laravel paginate

$category = Category::first();
$apps = $category->apps()->paginate(10);
return view('example', compact('category', 'apps'));
3
public function index()
{
  $users = DB::table('users')->paginate(15);

  return view('user.index', ['users' => $users]);
}
1
@foreach ($apps as $app)
    {{ $app->id }}
@endforeach

{!! $apps->render() !!}
2

New to Communities?

Join the community