59 lines
2.6 KiB
PHP
59 lines
2.6 KiB
PHP
@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>{{ __('Заказ #:number', ['number' => $order->id]) }}</span>
|
|
<strong>{{ number_format($order->total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
|
|
</a>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|