From d2fa9ea9e069abf543839865010dbf2bd9180032 Mon Sep 17 00:00:00 2001 From: anazaryan Date: Wed, 27 Nov 2024 21:12:59 +0400 Subject: [PATCH] add vacancy created modal --- app/Http/Controllers/EmployerController.php | 2 +- resources/views/employers/list_vacancy.blade.php | 21 +++++++++++++++++++++ resources/views/modals/message.blade.php | 7 +++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 resources/views/modals/message.blade.php diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index 863909e..10fc49c 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -206,7 +206,7 @@ class EmployerController extends Controller $ad_jobs = Ad_employer::create($params_emp); $ad_jobs->jobs()->sync($request->get('job_title_id')); - return redirect()->route('employer.vacancy_list'); + return redirect()->route('employer.vacancy_list')->with('success', 'Вакансия успешно опубликована'); } // Список вакансий diff --git a/resources/views/employers/list_vacancy.blade.php b/resources/views/employers/list_vacancy.blade.php index cb9fe8a..98d5813 100644 --- a/resources/views/employers/list_vacancy.blade.php +++ b/resources/views/employers/list_vacancy.blade.php @@ -31,6 +31,27 @@ @section('content')
+ @if (session('success')) + @include('modals.message', [ + 'title' => 'Спасибо!', + 'message' => session('success') + ]) + + + @endif