User page styling
This commit is contained in:
parent
f2c368ae67
commit
07849a970e
1 changed files with 21 additions and 17 deletions
|
@ -1,24 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', "Sklep")
|
||||
|
||||
@section('main')
|
||||
<p>
|
||||
<b>Welcome, you are logged in as {{ $user }}</b>
|
||||
<b>Welcome, you are logged in as {{ $user->name }}</b>
|
||||
</p>
|
||||
<div>
|
||||
<h2>Your cart:</h2>
|
||||
<ul>
|
||||
@foreach($user->cart as $product)
|
||||
<li> {{ $product }} </li>
|
||||
@endforeach()
|
||||
</ul>
|
||||
</div>
|
||||
<p>
|
||||
<a href="/logout"> Logout </a>
|
||||
</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>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue