This commit is contained in:
63
resources/views/admin/dashboard.blade.php
Normal file
63
resources/views/admin/dashboard.blade.php
Normal file
@@ -0,0 +1,63 @@
|
||||
@extends('layouts.shop')
|
||||
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Админка', 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Панель администратора</h2>
|
||||
<p>Управление товарами, категориями, заказами, чатами и слайдерами.</p>
|
||||
</div>
|
||||
|
||||
<div class="pc-grid pc-grid-4">
|
||||
<div class="pc-card">
|
||||
<h3>Категории</h3>
|
||||
<p>{{ $stats['categories'] }}</p>
|
||||
</div>
|
||||
<div class="pc-card">
|
||||
<h3>Товары</h3>
|
||||
<p>{{ $stats['products'] }}</p>
|
||||
</div>
|
||||
<div class="pc-card">
|
||||
<h3>Заказы</h3>
|
||||
<p>{{ $stats['orders'] }}</p>
|
||||
</div>
|
||||
<div class="pc-card">
|
||||
<h3>Выручка</h3>
|
||||
<p>{{ number_format($stats['revenue'], 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pc-product-actions">
|
||||
<a class="pc-btn primary" href="{{ route('admin.products.index') }}">Товары</a>
|
||||
<a class="pc-btn ghost" href="{{ route('admin.categories.index') }}">Категории</a>
|
||||
<a class="pc-btn ghost" href="{{ route('admin.orders.index') }}">Заказы</a>
|
||||
<a class="pc-btn ghost" href="{{ route('admin.home-slides.index') }}">Слайдеры</a>
|
||||
<a class="pc-btn ghost" href="{{ route('admin.chats.index') }}">Чаты</a>
|
||||
<form method="post" action="{{ route('admin.logout') }}">
|
||||
@csrf
|
||||
<button class="pc-btn ghost" type="submit">Выйти</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="pc-card">
|
||||
<h3>Последние заказы</h3>
|
||||
@if ($recentOrders->isEmpty())
|
||||
<p>Пока нет заказов.</p>
|
||||
@else
|
||||
<div class="pc-account-orders">
|
||||
@foreach ($recentOrders as $order)
|
||||
<a class="pc-account-order" href="{{ route('admin.orders.show', $order) }}">
|
||||
<span>Заказ #{{ $order->id }} ({{ $order->status }})</span>
|
||||
<strong>{{ number_format($order->total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user