laravel get result in pagnation
In Controller
$subSections = Subsection::with('mainsection')->paginate(2);
In Blade
{{ $subSections->links() }}
Or
{{ $subSections->appends(request()->except('page'))->links() }}
For designing the pagination
https://laravel.com/docs/8.x/pagination
Follow me at www.makeyourownproject.com