Preview: index.blade.php
Size: 3.33 KB
//proc/thread-self/root/home/getspomw/royalsquad.us/resources/views/admin/access_controls/index.blade.php
@extends('includes.admin.adminapp')
@section('content')
<div class="page-wrapper">
<div class="page-content">
<div class="container">
{{-- Flash Messages --}}
@if (session('success'))
<div class="alert alert-success flash-message">{{ session('success') }}</div>
@endif
@if (session('error'))
<div class="alert alert-danger flash-message">{{ session('error') }}</div>
@endif
{{-- Top Bar --}}
<div class="page-breadcrumb d-sm-flex align-items-center mb-3 ">
<div class="breadcrumb-title pe-3">{{ $moduleTitle ?? 'Access control' }}</div>
<div class="ms-auto">
<div class="btn-group" style="margin-top: 20px;">
<a href="{{ route('access-controls.create') }}">
<button type="button" class="btn btn-primary">Add Access</button>
</a>
</div>
</div>
</div>
{{-- Bulk Delete Form --}}
<div class="table-responsive ">
<table class="table table-striped table-hover" id="dataTableModule">
<thead>
<tr>
<th>Sr No.</th>
<th>Type</th>
<th>Value</th>
<th>Status</th>
<th>Created Date</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@foreach ($accessControls as $item)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $item->type }}</td>
<td>{{ $item->value }}</td>
<td>
@if($item->is_allowed == 1)
<span class="badge bg-success">Active</span>
@else
<span class="badge bg-danger">Blocked</span>
@endif
</td>
<td>{{ $item->created_at->format('Y-m-d') }}</td>
<td>
<a href="{{ route('access-controls.edit', $item->id) }}" class="btn btn-info btn-sm">Edit</a>
<form action="{{ route('access-controls.destroy', $item->id) }}" method="POST" class="delete-form" style="display:inline;">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-danger btn-sm">Delete</button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
</table>
</div>
</div>
</div>
</div>
<script>
setTimeout(() => {
document.querySelectorAll('.flash-message').forEach(el => {
el.style.transition = "opacity 0.5s ease";
el.style.opacity = "0";
setTimeout(() => el.remove(), 500);
});
}, 4000);
</script>
@endsection
Directory Contents
Dirs: 0 × Files: 3