From 4436a6b2b3dde0edc104b3f4904c9beff8f215e9 Mon Sep 17 00:00:00 2001 From: mirivlad Date: Thu, 26 Mar 2026 10:53:58 +0800 Subject: [PATCH] =?UTF-8?q?Feat:=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20show=20=D0=B8=20edit=20=D1=88=D0=B0=D0=B1?= =?UTF-8?q?=D0=BB=D0=BE=D0=BD=D1=8B=20=D0=B4=D0=BB=D1=8F=20=D0=BA=D0=B0?= =?UTF-8?q?=D1=82=D0=B5=D0=B3=D0=BE=D1=80=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Qwen-Coder --- .../admin/course-categories/edit.blade.php | 65 ++++++++++++++ .../admin/course-categories/show.blade.php | 90 +++++++++++++++++++ 2 files changed, 155 insertions(+) create mode 100644 resources/views/admin/course-categories/edit.blade.php create mode 100644 resources/views/admin/course-categories/show.blade.php diff --git a/resources/views/admin/course-categories/edit.blade.php b/resources/views/admin/course-categories/edit.blade.php new file mode 100644 index 0000000..8e4b143 --- /dev/null +++ b/resources/views/admin/course-categories/edit.blade.php @@ -0,0 +1,65 @@ +@extends('layouts.app') +@section('title', 'Редактировать категорию') +@section('content') +
+
+ +
+
+

Редактировать: {{ $category->name }}

+ Назад +
+
+ @csrf @method('PUT') +
+
+
+
+
+ + + @error('name')
{{ $message }}
@enderror +
+
+ + + @error('slug')
{{ $message }}
@enderror +
+
+ + +
+
+
+
+
+
+
+
+ + +
+
+ + +
+
+ is_active) ? 'checked' : '' }}> + +
+
+
+
+
+ + Отмена +
+
+
+
+@endsection diff --git a/resources/views/admin/course-categories/show.blade.php b/resources/views/admin/course-categories/show.blade.php new file mode 100644 index 0000000..4c7fb7a --- /dev/null +++ b/resources/views/admin/course-categories/show.blade.php @@ -0,0 +1,90 @@ +@extends('layouts.app') +@section('title', $category->name) +@section('content') +
+
+ +
+
+

{{ $category->name }}

+
+ @can('update', $category)Редактировать@endcan + Назад +
+
+
+
+
+
Информация
+
+ + + + + + + +
Название:{{ $category->name }}
Slug:{{ $category->slug }}
Описание:{{ $category->description ?? '—' }}
Родитель:{{ $category->parent?->name ?? '—' }}
Порядок:{{ $category->sort_order }}
Статус:@if($category->is_active)Активна@elseНе активна@endif
+
+
+
+
+
+
Статистика
+
+
+
+
{{ $category->courses->count() }}
+
Курсов
+
+
+
{{ $category->children->count() }}
+
Подкатегорий
+
+
+
+
+
+
+ @if($category->children->count() > 0) +
+
+
+
Подкатегории
+
+
    + @foreach($category->children as $child) +
  • + {{ $child->name }} + {{ $child->courses_count }} курсов +
  • + @endforeach +
+
+
+
+
+ @endif + @if($category->courses->count() > 0) +
+
+
+
Курсы
+
+
    + @foreach($category->courses->take(10) as $course) +
  • {{ $course->title }}
  • + @endforeach +
+ @if($category->courses->count() > 10) +
+ ещё {{ $category->courses->count() - 10 }} курсов
+ @endif +
+
+
+
+ @endif +
+
+
+@endsection