laravel paginate index start 0 code example
Example 1: paginate relationship laravel7
$category = Category::first();
$apps = $category->apps()->paginate(10);
return view('example', compact('category', 'apps'));
Example 2: paginate relationship laravel7
@foreach ($apps as $app)
{{ $app->id }}
@endforeach
{!! $apps->render() !!}