diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index 7f875ac..6553f5a 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -563,6 +563,8 @@ class EmployerController extends Controller } $Workers = $Workers->get(); + + return view('employers.favorite', compact('Workers')); } diff --git a/app/Http/Controllers/MainController.php b/app/Http/Controllers/MainController.php index e4638a1..ce89503 100644 --- a/app/Http/Controllers/MainController.php +++ b/app/Http/Controllers/MainController.php @@ -108,10 +108,9 @@ class MainController extends Controller if ($request->has('code_record')) { if ($request->has('delete')) { + $code = $request->get('code_record'); $atomic_era = Like_vacancy::select('id')-> - where('code_record', '=', $request-> - get('code_record'))->first(); - + where('code_record', '=', $code)->toSql(); DB::table('like_vacancy')->where('code_record', $request->get('code_record'))->delete(); } else { diff --git a/resources/views/employers/favorite.blade.php b/resources/views/employers/favorite.blade.php index ac958dc..9e9a750 100644 --- a/resources/views/employers/favorite.blade.php +++ b/resources/views/employers/favorite.blade.php @@ -46,7 +46,7 @@ }); }); - @include('js.favorite-vacancy-45') + @include('js.favorite-worker') @endsection @section('content') @@ -104,7 +104,7 @@ @foreach ($Workers as $it)