@extends('layouts.admin') @section('css') @endsection @section('admin')

Bag Management : {{$type}}

@foreach($gifts as $gift) @php // path stored in DB (relative to public/), adjust if your path is different $file = $gift->gift_file; $publicFile = $file ? public_path($file) : null; @endphp @endforeach
Name Image Validity Purchase Coin Status Action
{{$gift->gift_name}} @if(!empty($gift->gift_file) && file_exists($gift->gift_file)) @php $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION)); @endphp @if($ext === 'svga')
@else {{-- Regular raster/image --}} image @endif @else image @endif
{{ $gift->gift_validity }} Days {{ $gift->gift_purchase_coin }} Coins {{$gift->is_active == 1 ? 'Active' : 'In-Active'}}
@if($gifts->hasPages())
Showing {{ $gifts->firstItem() ?? 0 }} to {{ $gifts->lastItem() ?? 0 }} of {{ $gifts->total() }} gifts
{{ $gifts->appends(request()->query())->links() }}
@endif @endsection @section('js') @endsection