Commit df4edc01dc32bd2640a02590eba712db4abfc122
1 parent
f950a1227c
Exists in
master
and in
1 other branch
Обновление данных
Showing 3 changed files with 7 additions and 7 deletions Side-by-side Diff
app/Http/Controllers/EmployerController.php
... | ... | @@ -22,6 +22,7 @@ use App\Models\Job_title; |
22 | 22 | use App\Models\Like_vacancy; |
23 | 23 | use App\Models\Like_worker; |
24 | 24 | use App\Models\Message; |
25 | +use App\Models\Positions; | |
25 | 26 | use App\Models\Worker; |
26 | 27 | use Carbon\Carbon; |
27 | 28 | use Illuminate\Auth\Events\Registered; |
... | ... | @@ -115,12 +116,13 @@ class EmployerController extends Controller |
115 | 116 | $id = Auth()->user()->id; |
116 | 117 | $jobs = Job_title::query()->OrderBy('name')->get(); |
117 | 118 | $categories = Category::query()->get(); |
119 | + $Positions = Positions::query()->get(); | |
118 | 120 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
119 | 121 | WhereHas('users', |
120 | 122 | function (Builder $query) use ($id) {$query->Where('id', $id); |
121 | 123 | })->get(); |
122 | 124 | |
123 | - return view('employers.add_vacancy', compact('Employer', 'jobs' , 'categories')); | |
125 | + return view('employers.add_vacancy', compact('Employer', 'jobs' , 'categories', 'Positions')); | |
124 | 126 | } |
125 | 127 | |
126 | 128 | // Сохранение вакансии |
app/Http/Requests/RequestPosition.php
resources/views/employers/add_vacancy.blade.php
... | ... | @@ -99,11 +99,9 @@ |
99 | 99 | <div class="form-group__item"> |
100 | 100 | <div class="select"> |
101 | 101 | <select class="js-select2" name="position_ship" id="position_ship"> |
102 | - <option> Выберите позицию из списка</option> | |
103 | - <option value="Палуба">Палуба</option> | |
104 | - <option value="МО">МО</option> | |
105 | - <option value="Рядовые">Рядовые</option> | |
106 | - <option value="Прочие">Прочие</option> | |
102 | + @foreach ($Positions as $it) | |
103 | + <option value="{{ $it->name }}">{{ $it->name }}</option> | |
104 | + @endforeach | |
107 | 105 | </select> |
108 | 106 | @error('postion_ship') |
109 | 107 | <span class="text-xs text-red-600 dark:text-red-400"> |