From f3f96e3932c28cc2b3e61fb80914886dccaea606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=20=D0=9B=D0=B0=D1=80?= =?UTF-8?q?=D0=B8=D0=BE=D0=BD=D0=BE=D0=B2?= Date: Thu, 28 Mar 2024 19:43:48 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=B7=D1=83=D0=BB=D1=8C=D1=82=D0=B0=D1?= =?UTF-8?q?=82=20=D1=84=D0=B8=D0=BD=D0=B0=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Admin/JobTitlesController.php | 2 +- app/Http/Controllers/MainController.php | 4 ++-- routes/web.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Admin/JobTitlesController.php b/app/Http/Controllers/Admin/JobTitlesController.php index d2aa91c..eb62bdb 100644 --- a/app/Http/Controllers/Admin/JobTitlesController.php +++ b/app/Http/Controllers/Admin/JobTitlesController.php @@ -18,7 +18,7 @@ class JobTitlesController extends Controller */ public function index() { - $Jobs = Job_title::query()->orderBy('name')->active()->paginate(15); + $Jobs = Job_title::query()->orderBy('name')->paginate(15); return view('admin.job_titles.index', compact('Jobs')); } diff --git a/app/Http/Controllers/MainController.php b/app/Http/Controllers/MainController.php index 0c44354..89b5b04 100644 --- a/app/Http/Controllers/MainController.php +++ b/app/Http/Controllers/MainController.php @@ -39,7 +39,7 @@ class MainController extends Controller ->GroupBy('categories.id') ->get(); - $Position = Category::query()->get(); + $Position = Category::query()->where('is_remove', '=', '0')->get(); /*$BigFlot = Array(); foreach ($Position as $position) { @@ -149,7 +149,7 @@ class MainController extends Controller $categories = $categories->OrderByDesc('created_at')->GroupBy('categories.id')->get(); - $Position = Category::query()->get(); + $Position = Category::query()->where('is_remove', '=', '0')->get(); /*$BigFlot = Array(); foreach ($Position as $position) { diff --git a/routes/web.php b/routes/web.php index 3112e51..4ca56d4 100644 --- a/routes/web.php +++ b/routes/web.php @@ -232,9 +232,9 @@ Route::group([ // кабинет - категории //Route::get('categories', [AdminController::class, 'index'])->name('categories'); - /* - * CRUD-операции над Справочником Категории - */ + + // СRUD-операции над Справочником Категории + Route::resource('categories', CategoryController::class, ['except' => ['show']]); // CRUD-операции над справочником Категории для работодателей -- 1.7.10.4