@extends('layouts.admin') @section('title', $moduleTitle) @section('content')
@foreach ($filters as $key => $filter) @endforeach @if (request()->hasAny(['q', 'status', ...array_keys($filters)])) Clear @endif
@can($moduleKey.'.create') New {{ Str::lower($moduleSingular) }} @endcan
@if ($records->isEmpty())

No records found

{{ request()->hasAny(['q', 'status', ...array_keys($filters)]) ? 'Try clearing the filters above.' : 'Create the first one to get started.' }}

@else
@foreach ($columns as $key => $column) @endforeach @foreach ($records as $record) @foreach ($columns as $key => $column) @endforeach @endforeach
{{ $column['label'] }}Actions
@include('admin.crud.cell', ['record' => $record, 'key' => $key, 'column' => $column])
@can($moduleKey.'.update') @if (array_key_exists('is_active', $record->getAttributes()))
@csrf @method('PATCH')
@endif @endcan @can($moduleKey.'.delete')
@csrf @method('DELETE')
@endcan
@if ($records->hasPages())
{{ $records->links() }}
@endif @endif
@endsection