Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current none :
/
var
/
www
/
html
/
tpid-jsd
/
resources
/
views
/
section
/
gallery
/
Or
Select Your none :
Upload File :
New :
File
Dir
/var/www/html/tpid-jsd/resources/views/section/gallery/edit.blade.php
@extends('layout.default') @section('title','Detail Partner Logos') @section('content') <!--begin::Card--> <div class="card card-custom"> <div class="card-header flex-wrap py-5"> <div class="card-title"> <h3 class="card-label">Gallery Square </div> {{-- <div class="card-toolbar"> <!--begin::Button--> <button type="button" class="btn btn-primary font-weight-bolder" data-toggle="modal" data-target="#image_upload"> Upload Logo </button> @include('section.gallery.modal_upload') <!--end::Button--> </div> --}} </div> <!--begin::Card body--> <div class="card-body border-top p-9"> @include('layout.alerts.index') <div class="row"> @foreach($data as $item) <div class="col-lg-3 mt-2"> <!--begin::Card--> <div class="card overlay overflow-hidden"> <div class="card-body p-0"> <div class="overlay-wrapper"> <img src="{{ $item->path }}" alt="" class="w-100 rounded" /> </div> <div class="overlay-layer bg-dark bg-opacity-25 align-items-end justify-content-center"> <div class="d-flex flex-grow-1 flex-center py-5"> <a data-url="{{ route('gallery.square.destroy') }}" class="btn btn-sm btn-danger btn-active-light-primary" data-id="{{ $item->id }}" onclick="deleteSweet(this)"> <i class="fa fa-trash"></i> Delete Image </a> </div> </div> </div> </div> <!--end::Card--> </div> @endforeach </div> @include('section.gallery.pagination') </div> </div> <!--end::Card--> @endsection @section('script') <script type="text/javascript"> function deleteSweet(e) { // CommonJS const url = $(e).data('url') const id = $(e).data('id') const csrf_token = $('meta[name="csrf-token"]').attr('content'); Swal.fire({ title: "Are you sure?", text: "You won\'t be able to revert this!", icon: "warning", showCancelButton: true, confirmButtonColor: '#a83232', confirmButtonText: "Yes, delete it!" }).then((result) => { if (result.value) { $('#loading').show(); $.ajax({ url: url, type: "POST", data: { '_method': 'POST', '_token': csrf_token, 'id': id }, success: function (response) { $('#loading').hide(); if (response.status == false) { Swal.fire({ type: 'error', title: 'Oops...', text: 'Something went wrong!' }).then((result) => { if (result.value) { $(location).attr('href', "{{ route('gallery.edit', $gallery_big->id) }}" ); } }); } if (response.status == true) { Swal.fire("Success!", "Data has been deleted!", "success").then(( result) => { if (result.value) { $(location).attr('href', "{{ route('gallery.edit', $gallery_big->id) }}" ); } $(location).attr('href', "{{ route('gallery.edit', $gallery_big->id) }}"); }); } }, error: function (xhr) { $('#loading').hide(); Swal.fire("Oops....", "Something went wrong!", "error"); } }); } }); }; </script> @endsection