Commit 410b65e5b092de931804177a29238c9f5f6693af
1 parent
3e8ab15f22
Exists in
master
and in
1 other branch
Видимость в админке и в регистрации должностей
Showing 2 changed files with 3 additions and 3 deletions Side-by-side Diff
app/Http/Controllers/Admin/UsersController.php
... | ... | @@ -67,7 +67,7 @@ class UsersController extends Controller |
67 | 67 | } |
68 | 68 | |
69 | 69 | public function add_bd() { |
70 | - $list_job_titles = Job_title::query()->active()->bdif()->orderBy('name', 'asc')->get(); | |
70 | + $list_job_titles = Job_title::query()->active()->where('is_bd', '=' , '2')->orderBy('name', 'asc')->get(); | |
71 | 71 | return view('admin.users.add', compact('list_job_titles')); |
72 | 72 | } |
73 | 73 | |
... | ... | @@ -94,7 +94,7 @@ class UsersController extends Controller |
94 | 94 | } |
95 | 95 | |
96 | 96 | public function edit_bd(User $user) { |
97 | - $list_job_titles = Job_title::query()->active()->bdif()->orderBy('name', 'asc')->get(); | |
97 | + $list_job_titles = Job_title::query()->active()->where('is_bd', '=' , '2')->orderBy('name', 'asc')->get(); | |
98 | 98 | return view('admin.users.edit', compact('user', 'list_job_titles')); |
99 | 99 | } |
100 | 100 |
app/Providers/MyServiceProvider.php
... | ... | @@ -112,7 +112,7 @@ class MyServiceProvider extends ServiceProvider |
112 | 112 | $view_job_title = ['modals.register']; |
113 | 113 | View::composer($view_job_title, |
114 | 114 | function($view_job_title) { |
115 | - $Job_titles = Job_title::query()->where('is_remove', '=', '0')->get(); | |
115 | + $Job_titles = Job_title::query()->where('is_remove', '=', '0')->where('is_bd', '=' , '0')->get(); | |
116 | 116 | $view_job_title->with(['Job_titles' => $Job_titles]); |
117 | 117 | } |
118 | 118 | ); |