Skip to content

Instantly share code, notes, and snippets.

@miyasinarafat
Created July 20, 2018 16:26
Show Gist options
  • Save miyasinarafat/74353371da07f50bfdfb1ba243f8f534 to your computer and use it in GitHub Desktop.
Save miyasinarafat/74353371da07f50bfdfb1ba243f8f534 to your computer and use it in GitHub Desktop.
Advanced Laravel Pagination
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
@foreach(array_chunk($items->getCollection()->all(), 3) as $row)
<div class="row">
@foreach($row as $item)
@include ('items/_item')
@endforeach
</div>
@endforeach
{{ $items->appends(Request::except('page'))->links() }}
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment