pai-sklep/resources/views/order/create.blade.php
2021-12-15 18:56:52 +01:00

30 lines
923 B
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
</style>
</head>
<body>
@if(Session::has('success'))
<div class="alert alert-success">
{{Session::get('success')}}
</div>
@endif
<div>
<form method="post" action="{{ route("order.store") }}">
@foreach($products_with_quantities as $product)
<input type="hidden" name="products[{{ $loop->index }}]" value="{{ $product[0]->uuid }}">
<x-product :product="$product[0]"/>
<input type="number" name="product_quantities[{{ $loop->index }}]" value="{{ $product[1] }}">
@endforeach
<textarea name="address"></textarea>
<input type="submit">
@csrf
</form>
</div>
</body>
</html>