@extends('layouts.app') @section('content')

{{ __('Gallery Images') }}

@hasPermission('shop.gallery.create') {{__('Upload Images')}} @endhasPermission
@php $hasFolder = request('folder'); @endphp
{{ __('Gallery') }} @if ($hasFolder) ({{ $hasFolder }} {{__('files')}}) @else {{__('folders')}} @endif
@if (!$hasFolder)
@forelse($galleries as $gallery)
{{ $gallery->name }}
@empty

{{__('No gallery found!')}}

@endforelse
@else
@forelse($folderFiles as $file) @php $reaPath = realpath($file); $fileName = pathinfo($reaPath, PATHINFO_FILENAME); $extension = pathinfo($file, PATHINFO_EXTENSION); $file = $fileName . '.' . $extension; $folderName = 'gallery/shop' . auth()->user()->shop->id . '/' . $hasFolder; $url = Storage::url($folderName . '/' . $file); @endphp
imageI

{{ $fileName }}.{{ $extension }}

@empty

{{__('Folder is empty!')}}

@endforelse
@endif
@if (!$hasFolder)
{{ $galleries->links() }}
@endif
@endsection