paginate relationship laravel7
snippet in php

paginate relationship laravel7

user5495

$category = Category::first();
$apps = $category->apps()->paginate(10);
return view('example', compact('category', 'apps'));

paginate relationship laravel7

user7439

@foreach ($apps as $app)
    {{ $app->id }}
@endforeach

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