Files
sccs_laravel/resources/views/content/games/index.blade.php
2025-11-04 16:23:40 +05:00

129 lines
6.1 KiB
PHP

@extends('layouts/contentLayoutMaster')
@section('title', 'Application Games')
@section('vendor-style')
{{-- vendor css files --}}
<link rel="stylesheet" href="{{ asset(mix('vendors/css/extensions/toastr.min.css')) }}">
@endsection
@section('page-style')
{{-- Page Css files --}}
<link rel="stylesheet" href="{{ asset(mix('css/base/plugins/extensions/ext-component-toastr.css')) }}">
@endsection
@section('content')
<!-- Responsive Datatable -->
<section id="responsive-datatable">
<div class="row">
<div class="col-12">
<div class="card">
@if(@$banners->count() > 0)
<div class="card-datatable table-responsive ">
<table class="table" style="background-color: #ffff">
<thead>
<tr>
<th class="text-center">#</th>
<th class="text-center">Title</th>
<th class="text-center">Status</th>
<th class="text-center">Url</th>
<th class="text-center">Icon</th>
<th style="width: 95px">
Actions
</th>
</tr>
</thead>
<tbody>
@php
$i = 1;
@endphp
@foreach(@$banners as $banner)
<tr>
<td class="text-center">{{ @$i}}</td>
<td class="text-center">{{ @$banner->title}}</td>
<td class="text-center">@php $banner->status == 1 ? $status = 'Active' :$status = 'Inactive' @endphp {{$status}}</td>
<td class="text-center">{{ @$banner->url}}</td>
<td class="text-center">
<div class="avatar me-1">
@if(@$banner->picture)
<img
src="{{ App::make('url')->to('/') . '/storage' . @$banner->picture?? asset('images/avatars/default-profile-image.png')}}"
alt="Avatar" height="32" width="32">
@endif
</div>
</td>
<td>
<div class="btn-group">
<a class="btn btn-sm dropdown-toggle hide-arrow"
data-bs-toggle="dropdown"
aria-expanded="false">
<i class="fa-solid fa-ellipsis-vertical"
style="margin-right:5px;"></i>
</a>
<div class="dropdown-menu dropdown-menu-end" style="">
<a href="{{route('game.edit',$banner)}}"
class="dropdown-item">
<i class="fa-solid fa-file-lines" style="margin-right:5px;"></i>
Edit</a>
<form action="{{ URL::route('game.destroy', $banner)}}"
method="POST">
<input type="hidden" name="_method" value="DELETE">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<button class="dropdown-item" type="submit"><i
class="fa-solid fa-square-pen"
style="margin-right:5px;"></i> Delete
</button>
</form>
</div>
</div>
</td>
</tr>
@php
$i++;
@endphp
@endforeach
</tbody>
</table>
</div>
@else
<div class="card-datatable py-2 px-2">
<div class="d-flex justify-content-center">
<span class="alert alert-danger">
No Record Found
</span>
</div>
</div>
@endif
</div>
</div>
</div>
</section>
<!--/ Responsive Datatable -->
@endsection
@section('vendor-script')
{{-- vendor files --}}
<script src="{{ asset(mix('vendors/js/extensions/toastr.min.js')) }}"></script>
@endsection
@section('page-script')
{{-- Page js files --}}
<script>
$(document).ready(function () {
toastr.options.timeOut = 10000;
@if(session()->has('error'))
toastr.error('{{ session('error') }}');
@elseif(session()->has('success'))
toastr.success('{{ session('success') }}');
@endif
});
</script>
@endsection