Skip to content

Instantly share code, notes, and snippets.

@rimbaborne
Last active April 22, 2020 10:54
Laravel Complete Pagination on Views #laravel #pagination
@php
$first = 0;
$end = 0;
@endphp
@foreach($datas as $key=> $data)
{{ $key+ $datas->firstItem() }}
@php
$first = $datas->firstItem();
$end = $key + $datas->firstItem();
@endphp
@endforeach
{!! $first !!} - {!! $end !!} From {!! $datas->total() !!} Data
{!! $datas->appends(request()->query())->links() !!}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment