404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.143.254.28: ~ $
@extends('admin.layout.app')
@section('title', 'All App Images')
@push('custom_css')
    <link rel="stylesheet" href="{{ asset('assets/js/loader/waitMe.css') }}">
@endpush
@section('content')
    <div class="row">
        <div class="col-12">
            <div class="page-title-box d-sm-flex align-items-center justify-content-between">
                <h4 class="mb-sm-0">App Images</h4>
                <div class="page-title-right">
                    <ol class="breadcrumb m-0">
                        <li class="breadcrumb-item"><a href="{{route('admin.dashboard')}}">Dashboard</a></li>
                        <li class="breadcrumb-item active">App Images</li>
                    </ol>
                </div>
            </div>
        </div>
    </div>
    <div class="card">
        <div class="card-header align-items-center d-flex">
            <h4 class="card-title mb-0 flex-grow-1">App Images</h4>
            <div class="flex-shrink-0">
                <a href="{{route('admin.images.order')}}" class="btn btn-secondary" style="margin-right: 10px">Order Images</a>
            </div>
            <div class="flex-shrink-0">
                <a href="{{route('admin.images.add')}}" class="btn btn-primary">+ Add New</a>
            </div>
        </div><!-- end card header -->

        <div class="card-body">
            <div class="live-preview">
                <div class="table-responsive">
                    <table class="table align-middle mb-0 yajra-datatable">
                        <thead>
                        <tr>
                            <th scope="col">#</th>
                            <th scope="col">Image</th>
                            <th scope="col">Action</th>
                        </tr>
                        </thead>
                        <tbody></tbody>
                    </table>
                </div>
            </div>
        </div><!-- end card-body -->
    </div>
@endsection
@push('custom_scripts')
    <script src="{{ asset('assets/js/loader/waitMe.js') }}"></script>
    <script src="{{asset('assets/js/sweetalert.min.js')}}"></script>

    <script type="text/javascript">
        let table = $('.yajra-datatable').DataTable({
            processing: true,
            serverSide: true,
            ajax: "{{ route('admin.images.list-images') }}",
            columns: [
                {data: 'DT_RowIndex'},
                {data: 'images'},
                {data: 'action'},
            ],
            columnDefs: [
                {
                    targets: 0,
                    orderable: false,
                    className: "text-center"
                },
                {
                    targets: 1,
                    className: "text-center",
                    render: function (data, type, row, meta) {
                        return decodeHtml(row.images);
                    }
                },
                {
                    targets: -1,
                    orderable: false,
                    className: "text-center"
                },
            ],
            lengthMenu: [
                [5, 10, 25, 50, 100, -1],
                [5, 10, 25, 50, 100, 'All'],
            ],
        });

        table.on('draw', function () {
            $('.delete_btn').on('click', function () {
                let delete_url = $(this).parent().find('.delete_url').val()
                Swal.fire({
                    title: 'Are you sure?',
                    text: "You won't be able to revert this!",
                    icon: 'warning',
                    showCancelButton: true,
                    confirmButtonColor: '#3085d6',
                    cancelButtonColor: '#d33',
                    confirmButtonText: 'Yes, delete it!'
                }).then((result) => {
                    if (result.isConfirmed) {
                        $('body').waitMe({
                            effect: 'bounce',
                            text: 'Deleting. Please wait...',
                            color: "#fff",
                            bg: 'rgba(0,0,0,0.5)'
                        })

                        $.ajax({
                            url: delete_url,
                            dataType: 'json',
                            type: 'GET',
                            success: function (json) {
                                $('body').waitMe("hide");
                                if (json.status) {
                                    toastr.success('Image Deleted Successfully');
                                    table.draw()
                                } else {
                                    toastr.error('Something went wrong. Please try again later!');

                                    Snackbar.show({
                                        text: json.message,
                                        pos: 'bottom-center',
                                        backgroundColor: '#a3220f',
                                        timeout: 3000
                                    });

                                }
                            },
                            error: function (json) {
                                Snackbar.show({
                                    text: 'Something went wrong. Please try again later!',
                                    pos: 'bottom-center',
                                    backgroundColor: '#a3220f'
                                });
                                $('body').waitMe("hide");
                            }
                        })
                    } else {
                        Swal.fire({
                            title: "Image not deleted!",
                            icon: "info",
                            confirmButtonClass: "btn btn-primary w-xs mt-2",
                            buttonsStyling: !1
                        })
                    }
                })
            })
        })
    </script>
@endpush

Filemanager

Name Type Size Permission Actions
add.blade.php File 5.3 KB 0644
all.blade.php File 5.84 KB 0644
order.blade.php File 7.07 KB 0644