diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index af7ca84..cbe362c 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -22,6 +22,7 @@ use App\Models\Job_title; use App\Models\Like_vacancy; use App\Models\Like_worker; use App\Models\Message; +use App\Models\Positions; use App\Models\Worker; use Carbon\Carbon; use Illuminate\Auth\Events\Registered; @@ -115,12 +116,13 @@ class EmployerController extends Controller $id = Auth()->user()->id; $jobs = Job_title::query()->OrderBy('name')->get(); $categories = Category::query()->get(); + $Positions = Positions::query()->get(); $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> WhereHas('users', function (Builder $query) use ($id) {$query->Where('id', $id); })->get(); - return view('employers.add_vacancy', compact('Employer', 'jobs' , 'categories')); + return view('employers.add_vacancy', compact('Employer', 'jobs' , 'categories', 'Positions')); } // Сохранение вакансии diff --git a/app/Http/Requests/RequestPosition.php b/app/Http/Requests/RequestPosition.php index 43ecf72..c93ad77 100644 --- a/app/Http/Requests/RequestPosition.php +++ b/app/Http/Requests/RequestPosition.php @@ -17,7 +17,7 @@ class RequestPosition extends FormRequest 'name' => [ 'required', 'string', - 'min:3', + 'min:1', 'max:255', ], 'sort' => [ diff --git a/resources/views/employers/add_vacancy.blade.php b/resources/views/employers/add_vacancy.blade.php index bddb442..21df358 100644 --- a/resources/views/employers/add_vacancy.blade.php +++ b/resources/views/employers/add_vacancy.blade.php @@ -99,11 +99,9 @@
@error('postion_ship')