How to set onEachSide
at controller level on laravel
?
on blade
we use:
{{ $records->onEachSide(2)->links() }}
How this can be done at controller level?
CodePudding user response:
Record::paginate(10)->onEachSide(2);
How to set onEachSide
at controller level on laravel
?
on blade
we use:
{{ $records->onEachSide(2)->links() }}
How this can be done at controller level?
CodePudding user response:
Record::paginate(10)->onEachSide(2);