ldc-cocotte/resources/views/fo/modules/guarded-currency.blade.php

13 lines
321 B
PHP

@php
/** @var \Money\Money $money */
if (!$product instanceof \App\Dto\ProductDto) {
throw new \InvalidArgumentException('Product must be an instance of ProductDto to view prices.');
}
@endphp
@if (Gate::allows('viewPrices', $product))
<span>@money($money)</span>
@else
<span>{{ '-.--' }}</span>
@endif