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

119 lines
5.4 KiB
PHP

@extends('layouts/contentLayoutMaster')
@section('title', 'Application Backups')
@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')
<div class="text-end">
<a href="{{route('backup.create')}}" class="btn btn-primary " >Generate Backup</a>
</div>
<!-- Responsive Datatable -->
<section id="responsive-datatable">
<div class="row">
<div class="col-lg-6 col-sm-6">
<div class="card">
@if(@count($backups) > 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">File</th>
<th class="text-center">Date</th>
<th style="width: 95px">
Actions
</th>
</tr>
</thead>
<tbody>
@php
$i = 1;
@endphp
@foreach(@$backups as $backup)
<tr>
<td class="text-center">{{ @$i}}</td>
<td class="text-center">{{ @$backup->path}}</td>
<td class="text-center">{{ date('Y-m-d h:i a', strtotime($backup->created_at)) }}</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('backup.download',$backup)}}"
class="dropdown-item">
<i class="fa-solid fa-file-lines" style="margin-right:5px;"></i>
Download</a>
<form action="{{ URL::route('backup.destroy', $backup)}}"
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