Answers for "laravel get result in pagnation"

PHP
1

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
Posted by: Guest on August-08-2021

Browse Popular Code Answers by Language