pai-sklep/resources/views/components/product.blade.php

12 lines
508 B
PHP
Raw Permalink Normal View History

@props(['product'])
<a href="{{ route('product.show', ['product' => $product]) }}">
<div class="product-container">
2021-12-07 12:22:46 +01:00
<img class="product-image" src="@if(isset($product->images[0])) {{ $product->images[0]->URL() }} @else {{ asset("test.txt") }} @endif">
<div class="name-price-container">
<h2 class="product-name"> {{ $product->name }} </h2>
<h3>{{ ($product->price) }}<span class="price-currency"></span></h3>
</div>
</div>
</a>