From bbaa986c097d9b383906fa21fde033db3e0c1554 Mon Sep 17 00:00:00 2001 From: anazaryan Date: Wed, 27 Nov 2024 21:45:11 +0400 Subject: [PATCH] vacancy update and create popups --- app/Http/Controllers/EmployerController.php | 3 ++- resources/views/employers/edit_vacancy.blade.php | 4 ++++ resources/views/employers/list_vacancy.blade.php | 25 ++++------------------ resources/views/modals/flash-message.blade.php | 24 +++++++++++++++++++++ resources/views/modals/message.blade.php | 7 ------ 5 files changed, 34 insertions(+), 29 deletions(-) create mode 100644 resources/views/modals/flash-message.blade.php delete mode 100644 resources/views/modals/message.blade.php diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index 10fc49c..b4648f6 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -285,7 +285,8 @@ class EmployerController extends Controller $Employer = Employer::query() ->with('users')->with('ads')->with('flots')->where('user_id', $id)->first(); - return view('employers.edit_vacancy', compact('ad_employer', 'Positions','Employer', 'jobs')); + + return redirect()->back()->with('success', 'Вакансия успешно сохранена и опубликована'); } // Сохранение карточки вакансии diff --git a/resources/views/employers/edit_vacancy.blade.php b/resources/views/employers/edit_vacancy.blade.php index c7c596c..a40e259 100644 --- a/resources/views/employers/edit_vacancy.blade.php +++ b/resources/views/employers/edit_vacancy.blade.php @@ -32,6 +32,10 @@ @endsection @section('content')
+ @include('modals.flash-message', [ + 'title' => 'Спасибо!', + 'message' => session('success') + ])