This commit is contained in:
58
resources/views/shop/account.blade.php
Normal file
58
resources/views/shop/account.blade.php
Normal file
@@ -0,0 +1,58 @@
|
||||
@extends('layouts.shop')
|
||||
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Личный кабинет', 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Личный кабинет</h2>
|
||||
<p>Управляйте данными профиля и просматривайте историю заказов.</p>
|
||||
</div>
|
||||
|
||||
<div class="pc-grid pc-grid-2">
|
||||
<div class="pc-card">
|
||||
<form class="pc-form" method="post" action="{{ route('account.update') }}">
|
||||
@csrf
|
||||
<h3>Данные аккаунта</h3>
|
||||
<label>
|
||||
Имя
|
||||
<input type="text" name="name" value="{{ old('name', $user->name) }}" required>
|
||||
</label>
|
||||
<label>
|
||||
Email
|
||||
<input type="email" name="email" value="{{ old('email', $user->email) }}" required>
|
||||
</label>
|
||||
<div class="pc-product-actions">
|
||||
<button class="pc-btn primary" type="submit">Сохранить</button>
|
||||
</div>
|
||||
</form>
|
||||
<form method="post" action="{{ route('logout') }}">
|
||||
@csrf
|
||||
<button class="pc-btn ghost" type="submit">Выйти</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="pc-card">
|
||||
<h3>Мои заказы</h3>
|
||||
@if ($orders->isEmpty())
|
||||
<p>Пока нет заказов.</p>
|
||||
<a class="pc-btn ghost" href="{{ route('catalog.index') }}">Перейти в каталог</a>
|
||||
@else
|
||||
<div class="pc-account-orders">
|
||||
@foreach ($orders as $order)
|
||||
<a class="pc-account-order" href="{{ route('account.orders.show', $order) }}">
|
||||
<span>Заказ #{{ $order->id }}</span>
|
||||
<strong>{{ number_format($order->total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user