pai-sklep/resources/views/index.blade.php

17 lines
517 B
PHP
Raw Normal View History

2021-11-14 20:44:10 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sklep</title>
</head>
<body>
@foreach ($products as $product)
<div class="product-container">
<img class="product-image" src="@if(isset($product->images[0])) {{ $product->images[0]->URL() }} @else {{ asset("test.txt") }} @endif">
<p class="product-name"> {{ $product->name }} </p>
</div>
@endforeach
</body>
</html>