Skip to content

Instantly share code, notes, and snippets.

View cvaize's full-sized avatar

Орлов Дмитрий cvaize

  • Batyukov Studio
View GitHub Profile
@cvaize
cvaize / bootstrap-4.blade.php
Last active October 13, 2022 19:06
Laravel pagination on lg( @media( >= 480px) ) screens onEachSide(5) and on xs( @media( < 480px) ) screens onEachSide(1)
@if ($paginator->hasPages())
<?php
if (sizeof($elements[0]) === 2) {
unset($elements[0][array_key_last($elements[0])]);
}
if (sizeof($elements[4]) === 2) {
unset($elements[4][array_key_first($elements[4])]);
}
?>