{{-- @php $sticker_id = $attributes->get('sticker_id'); \Log::info('Sticker ID in Blade:', ['sticker_id' => $sticker_id]); @endphp
@if (!empty($sticker_id)) Generate Template @else Enter Sticker ID to generate template @endif
--}} @props(['sticker_id']) {{-- @php $var = $sticker_id ?? 'undefined'; \Log::info('Blade Debug: sticker_id type = ' . gettype($var)); \Log::info('Blade Debug: sticker_id value = ', ['value' => $var]); $isValid = $sticker_id && $sticker_id != 'empty'; $url = $isValid ? route('stickers.pdf', ['stickerId' => $sticker_id]) : '#'; @endphp --}} @php use App\Models\StickerStructureDetail; $isValid = false; if (!empty($sticker_id) && $sticker_id != 'empty') { $isValid = StickerStructureDetail::where('sticker_id', $sticker_id)->exists(); } $url = $isValid ? route('stickers.pdf', ['stickerId' => $sticker_id]) : '#'; @endphp
Generate Template
{{--
Generate Template
--}}