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

Gift Store : {{ $type }}

@if ($type != 'special-badge') @endif @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 @if ($type != 'special-badge') @endif {{-- @if ($type != 'special-badge') @endif --}} @endforeach
Name Image ValidityPurchase CoinStatus 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
@if ($gift->gift_validate->isNotEmpty()) {{-- Pluck the days, convert to array, and join with commas --}} {{ implode(', ', $gift->gift_validate->pluck('validate_days')->toArray()) }} Days @else {{ $gift->gift_validity }} Days @endif @if ($gift->gift_validate->isNotEmpty()) {{-- Pluck the coins, convert to array, and join with commas --}} {{ implode(', ', $gift->gift_validate->pluck('validate_coin')->toArray()) }} Coins @else {{ $gift->gift_purchase_coin }} Coins @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 @foreach ($gifts as $gift) @endforeach @endsection @section('js') @endsection