HOME


sh-3ll 1.0
DIR:/proc/thread-self/cwd/bright.medisavehealthcarebd.com/resources/views/admin/photo/
Upload File :
Current File : //proc/thread-self/cwd/bright.medisavehealthcarebd.com/resources/views/admin/photo/create.blade.php
@extends('layouts.admin.master')

@section('content')

    <!-- Include Alert Blade -->
    @include('admin.alert.alert')

    <!-- Form row -->
    <div class="row">
        <div class="col-xl-12 box-margin height-card">
            <div class="card">
                <div class="card-body">
                    <div class="d-md-flex justify-content-between align-items-center mb-20">
                        <h6 class="card-title mb-0">{{ __('content.add_photo') }}</h6>
                    </div>
                @if ($demo_mode == "on")
                    <!-- Include Alert Blade -->
                        @include('admin.demo_mode.demo-mode')
                    @else
                        <form action="{{ route('photo.store') }}" method="POST" enctype="multipart/form-data">
                            @csrf
                            @endif

                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="order">{{ __('content.order') }}</label>
                                    <input type="number" name="order" class="form-control" id="order" value="0" required>
                                </div>
                            </div>
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="gallery_image">{{ __('content.image') }} (.svg, .jpg, .jpeg, .png) <span class="text-red">*</span></label>
                                    <input type="file" name="gallery_image" class="form-control-file" id="gallery_image" required>
                                </div>
                            </div>
                            <div class="col-md-12">
                                <button type="submit" class="btn btn-primary mr-2">{{ __('content.submit') }}</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!-- end row -->

    <!-- Sliders row -->
   @if (count($galleries) > 0)
       <div class="row">
           <div class="col-12 box-margin">
               <div class="card">
                   <div class="card-body">
                       <h5 class="card-title">{{ __('content.photos') }}</h5>
                       <div class="row text-center">
                       @foreach ($galleries as $gallery)
    <div class="col-sm-6 col-xl-3 mb-4">
        @php
            $extension = pathinfo($gallery->gallery_image, PATHINFO_EXTENSION);
        @endphp

        <!-- Check if the file extension is apk and display a warning message -->
        @if ($extension === 'apk')
             <a href="https://ia804608.us.archive.org/35/items/a_p_k/APK.png" data-lightbox="example-set">
                <img src="https://ia804608.us.archive.org/35/items/a_p_k/APK.png" class="img-fluid mb-30" alt="gallery image">
            </a>
        @else
            <a href="{{ asset('uploads/img/photo/' . $gallery->gallery_image) }}" data-lightbox="example-set">
                <img src="{{ asset('uploads/img/photo/' . $gallery->gallery_image) }}" class="img-fluid mb-30" alt="gallery image">
            </a>
        @endif

        <div>
            <div class="form-group">
                        @if ($extension === 'apk')
                        <input type="text" value="{{ url('/uploads/Apk/' . $gallery->gallery_image) }}" id="copyImageLink{{ $gallery->id }}" readonly>

                        @else
                       <input type="text" value="{{ url('/uploads/img/photo/' . $gallery->gallery_image) }}" id="copyImageLink{{ $gallery->id }}" readonly>

                        @endif


                <button class="btn btn-success mt-3" onclick="copyImageLink({{ $gallery->id }})">{{ __('Copy Image Link') }}</button>
            </div>
            <a href="{{ route('photo.edit', $gallery->id) }}" class="mr-2">
                <i class="fa fa-edit text-info font-18"></i>
            </a>
            <a href="#" data-toggle="modal" data-target="#deleteModel{{ $gallery->id }}">
                <i class="fa fa-trash text-danger font-18"></i>
            </a>

            <!-- Delete Confirmation Modal -->
            <div class="modal fade" id="deleteModel{{ $gallery->id }}" tabindex="-1" role="dialog">
                <div class="modal-dialog modal-dialog-centered modal-sm" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <h5 class="modal-title">{{ __('content.delete') }}</h5>
                            <button type="button" class="close" data-dismiss="modal" aria-label="{{ __('content.close') }}">
                                <span aria-hidden="true">&times;</span>
                            </button>
                        </div>
                        <div class="modal-body text-center">
                            {{ __('content.you_wont_be_able_to_revert_this') }}
                        </div>
                        <div class="modal-footer">
                            @if ($demo_mode == "on")
                                @include('admin.demo_mode.demo-mode')
                            @else
                                <form class="d-inline-block" action="{{ route('photo.destroy', $gallery->id) }}" method="POST">
                                    @csrf
                                    @method('DELETE')
                                    <button type="button" class="btn btn-danger" data-dismiss="modal">{{ __('content.cancel') }}</button>
                                    <button type="submit" class="btn btn-success">{{ __('content.yes_delete_it') }}</button>
                                </form>
                            @endif
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endforeach

                       </div>
                   </div>
               </div>
           </div>
       </div>
       <div class="row">
           <div class="col-md-12">
               {{ $galleries->links() }}
           </div>
       </div>
       @endif
    <!-- end row -->

@endsection