28 lines
681 B
PHP
28 lines
681 B
PHP
@extends('layouts.app')
|
|
|
|
@section('title', "Sklep")
|
|
|
|
@section('main')
|
|
<p>
|
|
<b>Welcome, you are logged in as {{ $user->name }}</b>
|
|
</p>
|
|
<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>
|