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?
Advertisement
Answer
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?
Record::paginate(10)->onEachSide(2);