How to set pagination in Laravel?

Good day to all.
Who knows how to make a pagination like this <<< 1 2 ... 12 13 >>>
Default pagination displays 11 references, I would like to reduce their number. Found the option for custom pagination of course
@if($articles->lastPage() > 1)
 @if($articles->currentPage() !== 1)
 <a href="{{ $articles->url(($articles->currentPage() - 1)) }}">{{ Lang::get('pagination.previous') }}</a>
@endif

 @for($i = 1; $i <= $articles->lastPage(); $i++)
 @if($articles->currentPage() == $i)
 <a class="selected disabled">{{ $i }}</a>
@else
 <a href="{{ $articles->url($i) }}">{{ $i }}</a>
@endif
@endfor

 @if($articles->currentPage() !== $articles->lastPage())
 <a href="{{ $articles->url(($articles->currentPage() + 1)) }}">{{ Lang::get('pagination.next') }}</a>
@endif
@endif

So it generally does not hide the extra links. One thread will help to fix it?
June 10th 19 at 14:46
1 answer
June 10th 19 at 14:48
check condition on the currentPage is 3, with the score from the unit, and 2 from zero, and change the reference point, then pass references to all that is greater than 3 or less than 2 and penultimate

you can hide the excess with CSS
Not get confused by the terms. Maybe as you have time and desire, will outline the code? - Woodrow commented on June 10th 19 at 14:51
no idea, I just still did not work
look for another profession, if you can't handle such simple things - Pedro65 commented on June 10th 19 at 14:54
Well, you too not much of a specialist, and did that ever, because if it did, the workpiece would remain. And lighten up and give advice any fool can - Woodrow commented on June 10th 19 at 14:57
you on the porch :) money is not given, so you send a curse in the back ))

really think that rudeness will help you become smarter? :) - Pedro65 commented on June 10th 19 at 15:00
Well, you also helped - Woodrow commented on June 10th 19 at 15:03
so I still got nasty :)
believe me, programming is not your - Pedro65 commented on June 10th 19 at 15:06
And not yours. So, to Dole out advice - Woodrow commented on June 10th 19 at 15:09
if it were not mine, you wish I was not rude in the hope that I will do your work for you - Pedro65 commented on June 10th 19 at 15:12
Okay, stop the useless debate. Sorry if that is wrong - Woodrow commented on June 10th 19 at 15:15

Find more questions by tags Laravel