User page styling

This commit is contained in:
bad 2021-12-05 19:23:42 +01:00
parent f2c368ae67
commit 07849a970e

View file

@ -1,24 +1,28 @@
<!DOCTYPE html> @extends('layouts.app')
<html lang="en">
<head> @section('title', "Sklep")
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> @section('main')
<title>Document</title>
</head>
<body>
<p> <p>
<b>Welcome, you are logged in as {{ $user }}</b> <b>Welcome, you are logged in as {{ $user->name }}</b>
</p> </p>
<div>
<h2>Your cart:</h2>
<ul>
@foreach($user->cart as $product)
<li> {{ $product }} </li>
@endforeach()
</ul>
</div>
<p> <p>
<a href="/logout"> Logout </a> <a href="/logout"> Logout </a>
</p> </p>
<div>
<h2>Your cart:</h2>
<div>
@foreach($user->cart as $product)
<div>
<x-product :product="$product" />
</div>
<form action="{{ route("removeFromCart", $product) }}" method="post">
@csrf
<button type="submit"> Remove from cart </a>
</form>
@endforeach()
</div>
</div>
@endsection()
</body> </body>
</html> </html>