13 lines
321 B
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
|