@extends('dashboard.core') @section('dashboard-heading') @if($export && count($rows) > 0) @endif @if($create) New @endif @endsection @section('dashboard-body')
@if(count($paramdisplay)) @foreach($paramdisplay as $param)
Showing {{ $heading }} with a {{ $param['title'] }} of "{{ $param['value'] }}"
@endforeach @endif @if($filter) @if(!$paginate) @if(count($rows) > 0) @endif @else
@endif @endif @if($paginate && $rows->lastPage() !== 1)
@php $pages_around = 2; $start_page = $rows->currentPage() - $pages_around; @endphp @if($start_page < 1) @php $start_page = 1; @endphp @elseif($start_page + $pages_around > $rows->lastPage()) @php $start_page = $rows->lastPage() - $pages_around; @endphp @endif @if($start_page > 1) 1 @endif @for($page = $start_page; $page < $start_page + 1 + $pages_around * 2; $page++) @if($page === $rows->currentPage())
{{ $page }}
@elseif($page <= $rows->lastPage()) {{ $page }} @endif @endfor @if($start_page + $pages_around * 2 < $rows->lastPage()) {{ $rows->lastPage() }} @endif
@endif @if(request()->query('search', null) != null && count($rows) == 0)
No Matching {{ $heading }} Found
@else @endif
@endsection