Looks like this problem is not with custom template.
If to set
$nominated_photos_per_page= 2;
I have pagination
1-20..89-90
When current page is 3 and request has 180 rows(90 pages for $nominated_photos_per_page= 2)
and in control I have :
->paginate($nominated_photos_per_page, array('*'), 'page', $page)
->onEachSide(3)
Also I aded this parameter in template :
{{ $nominatedPhotosPagination->onEachSide(3)->links() }}
But if to set $nominated_photos_per_page= 14;
I have pagionation 1..13 (for 180 rows) no gaps as I expected at all, and debugging pagination object I see :
[next_page_url] => http://127.0.0.1:8000/nomination/get_cities_selection_array?page=2
[path] => http://127.0.0.1:8000/nomination/get_cities_selection_array
[per_page] => 14
[prev_page_url] =>
[to] => 14
[total] => 180
I do not understand how it works...