Commit 486a3601d8504bba4586ebe2880b489ccbbced01
1 parent
4c66e360c8
Exists in
master
and in
1 other branch
Должности и работодатели на главной странице, Конструктор страниц
Showing 20 changed files with 878 additions and 46 deletions Inline Diff
- app/Http/Controllers/Admin/CompanyController.php
- app/Http/Controllers/PagesController.php
- app/Http/Requests/PagesRequest.php
- app/Models/employers_main.php
- app/Models/job_titles_main.php
- database/seeders/DatabaseSeeder.php
- database/seeders/EmployersMainSeeder.php
- database/seeders/JobTitlesMainSeeder.php
- resources/views/admin/category/index.blade.php
- resources/views/admin/employer_main/index.blade.php
- resources/views/admin/employer_main/index_ajax.blade.php
- resources/views/admin/job_main/index.blade.php
- resources/views/admin/job_main/index_ajax.blade.php
- resources/views/admin/messages.blade.php
- resources/views/admin/pages/add.blade.php
- resources/views/admin/pages/edit.blade.php
- resources/views/admin/pages/form.blade.php
- resources/views/admin/pages/index.blade.php
- resources/views/admin/users/roles/index.blade.php
- routes/web.php
app/Http/Controllers/Admin/CompanyController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers\Admin; | 3 | namespace App\Http\Controllers\Admin; |
4 | 4 | ||
5 | use App\Http\Controllers\Controller; | 5 | use App\Http\Controllers\Controller; |
6 | use App\Models\Employer; | ||
7 | use App\Models\employers_main; | ||
8 | use App\Models\Job_title; | ||
9 | use App\Models\job_titles_main; | ||
10 | use App\Models\pages; | ||
6 | use Illuminate\Http\Request; | 11 | use Illuminate\Http\Request; |
7 | 12 | ||
8 | class CompanyController extends Controller | 13 | class CompanyController extends Controller |
9 | { | 14 | { |
10 | // кабинет - редактор сайта | 15 | // кабинет - редактор сайта |
11 | public function editor() { | 16 | public function editor() { |
12 | return; | 17 | return; |
13 | } | 18 | } |
14 | 19 | ||
15 | // кабинет - редактор шапки-футера сайта | 20 | // кабинет - редактор шапки-футера сайта |
16 | public function editblocks() { | 21 | public function editblocks() { |
17 | return; | 22 | return; |
18 | } | 23 | } |
19 | 24 | ||
20 | // кабинет - редактор должности на главной | 25 | // кабинет - редактор должности на главной |
21 | public function job_titles_main() { | 26 | public function job_titles_main(Request $request) { |
22 | return; | 27 | if ($request->ajax()) { |
28 | $user = job_titles_main::find($request->id); | ||
29 | $request->offsetUnset('id'); | ||
30 | $user->update($request->all()); | ||
31 | } | ||
32 | |||
33 | $jobs = job_titles_main::query()->OrderBy('sort')->paginate(10); | ||
34 | $list_job_titles = Job_title::query()->active()->orderBy('name')->get(); | ||
35 | |||
36 | if ($request->ajax()) { | ||
37 | return view('admin.job_main.index_ajax', compact('jobs', 'list_job_titles')); | ||
38 | } else { | ||
39 | return view('admin.job_main.index', compact('jobs', 'list_job_titles')); | ||
40 | } | ||
23 | } | 41 | } |
24 | 42 | ||
25 | // кабинет - редактор работодатели на главной | 43 | // кабинет - редактор работодатели на главной |
26 | public function employers_main() { | 44 | public function employers_main(Request $request) { |
27 | return; | 45 | if ($request->ajax()) { |
46 | $user = employers_main::find($request->id); | ||
47 | $request->offsetUnset('id'); | ||
48 | $user->update($request->all()); | ||
49 | } | ||
50 | |||
51 | $employers = employers_main::query()->OrderBy('sort')->paginate(10); | ||
52 | $list_employers = Employer::query()->active()->orderBy('name_company')->get(); | ||
53 | |||
54 | if ($request->ajax()) { | ||
55 | return view('admin.employer_main.index_ajax', compact('employers', 'list_employers')); | ||
56 | } else { | ||
57 | return view('admin.employer_main.index', compact('employers', 'list_employers')); | ||
58 | } | ||
28 | } | 59 | } |
29 | 60 | ||
30 | // кабинет - редактор seo-сайта | 61 | // кабинет - редактор seo-сайта |
31 | public function editor_seo() { | 62 | public function editor_seo() { |
32 | return; | 63 | return; |
33 | } | 64 | } |
34 | 65 | ||
35 | // кабинет - редактор страниц | 66 | /////////// кабинет - редактор страниц //////////////////////////////// |
36 | public function editor_pages() { | 67 | public function editor_pages() { |
37 | return; | 68 | $pages = pages::query()->OrderBy('name')->paginate(15); |
69 | return view('admin.pages.index', compact('pages')); | ||
70 | } | ||
71 | |||
72 | public function editor_pages_add() { | ||
73 | return view('admin.pages.add'); | ||
74 | } | ||
75 | |||
76 | public function editor_pages_store(Request $request) { | ||
77 | return; | ||
78 | } | ||
79 | |||
80 | public function editor_pages_edit(pages $page) { | ||
81 | return view('admin.pages.edit', compact('page')); | ||
82 | } | ||
83 | |||
84 | public function editor_pages_update(Request $request, pages $page) { | ||
85 | return; | ||
86 | } | ||
87 | |||
88 | public function editor_pages_destroy(pages $page) { | ||
89 | return; | ||
38 | } | 90 | } |
91 | /////////////////////////////////////////////////////////////////// | ||
39 | 92 | ||
40 | // кабинет - реклама сайта | 93 | // кабинет - реклама сайта |
41 | public function reclames() { | 94 | public function reclames() { |
42 | return; | 95 | return; |
43 | } | 96 | } |
44 | } | 97 | } |
45 | 98 |
app/Http/Controllers/PagesController.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Http\Controllers; | ||
4 | |||
5 | use Illuminate\Http\Request; | ||
6 | |||
7 | class PagesController extends Controller | ||
8 | { | ||
9 | public function pages(string $slug) { | ||
10 | return; | ||
11 | } | ||
12 | } | ||
13 |
app/Http/Requests/PagesRequest.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Http\Requests; | ||
4 | |||
5 | use Illuminate\Foundation\Http\FormRequest; | ||
6 | |||
7 | class PagesRequest extends FormRequest | ||
8 | { | ||
9 | /** | ||
10 | * Determine if the user is authorized to make this request. | ||
11 | * | ||
12 | * @return bool | ||
13 | */ | ||
14 | public function authorize() | ||
15 | { | ||
16 | return false; | ||
17 | } | ||
18 | |||
19 | /** | ||
20 | * Get the validation rules that apply to the request. | ||
21 | * | ||
22 | * @return array<string, mixed> | ||
23 | */ | ||
24 | public function rules() | ||
25 | { | ||
26 | return [ | ||
27 | // | ||
28 | ]; | ||
29 | } | ||
30 | } | ||
31 |
app/Models/employers_main.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Models; | 3 | namespace App\Models; |
4 | 4 | ||
5 | use Illuminate\Database\Eloquent\Factories\HasFactory; | 5 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
6 | use Illuminate\Database\Eloquent\Model; | 6 | use Illuminate\Database\Eloquent\Model; |
7 | 7 | ||
8 | class employers_main extends Model | 8 | class employers_main extends Model |
9 | { | 9 | { |
10 | use HasFactory; | 10 | use HasFactory; |
11 | |||
12 | protected $fillable = [ | ||
13 | 'name', | ||
14 | 'employer_id', | ||
15 | 'sort', | ||
16 | ]; | ||
17 | |||
18 | /* | ||
19 | * Связь таблицы employers с таблицей employers_main | ||
20 | многие-к-одному | ||
21 | */ | ||
22 | public function employer() { | ||
23 | return $this->belongsTo(Employer::class, 'employer_id'); | ||
24 | } | ||
11 | } | 25 | } |
12 | 26 |
app/Models/job_titles_main.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Models; | 3 | namespace App\Models; |
4 | 4 | ||
5 | use Illuminate\Database\Eloquent\Factories\HasFactory; | 5 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
6 | use Illuminate\Database\Eloquent\Model; | 6 | use Illuminate\Database\Eloquent\Model; |
7 | 7 | ||
8 | class job_titles_main extends Model | 8 | class job_titles_main extends Model |
9 | { | 9 | { |
10 | use HasFactory; | 10 | use HasFactory; |
11 | |||
12 | protected $fillable = [ | ||
13 | 'name', | ||
14 | 'job_title_id', | ||
15 | 'sort', | ||
16 | ]; | ||
11 | } | 17 | } |
12 | 18 |
database/seeders/DatabaseSeeder.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace Database\Seeders; | 3 | namespace Database\Seeders; |
4 | 4 | ||
5 | // use Illuminate\Database\Console\Seeds\WithoutModelEvents; | 5 | // use Illuminate\Database\Console\Seeds\WithoutModelEvents; |
6 | use Illuminate\Database\Seeder; | 6 | use Illuminate\Database\Seeder; |
7 | 7 | ||
8 | class DatabaseSeeder extends Seeder | 8 | class DatabaseSeeder extends Seeder |
9 | { | 9 | { |
10 | /** | 10 | /** |
11 | * Seed the application's database. | 11 | * Seed the application's database. |
12 | * | 12 | * |
13 | * @return void | 13 | * @return void |
14 | */ | 14 | */ |
15 | public function run() | 15 | public function run() |
16 | { | 16 | { |
17 | $this->call(EmployersMainSeeder::class); | ||
18 | $this->command->info('Таблица работодатели на главной загружена!'); | ||
19 | |||
20 | $this->call(JobTitlesMainSeeder::class); | ||
21 | $this->command->info('Таблица должности на главной загружена!'); | ||
22 | |||
23 | |||
17 | // \App\Models\User::factory(10)->create(); | 24 | // \App\Models\User::factory(10)->create(); |
18 | 25 | ||
19 | // \App\Models\User::factory()->create([ | 26 | // \App\Models\User::factory()->create([ |
20 | // 'name' => 'Test User', | 27 | // 'name' => 'Test User', |
21 | // 'email' => 'test@example.com', | 28 | // 'email' => 'test@example.com', |
22 | // ]); | 29 | // ]); |
23 | } | 30 | } |
24 | } | 31 | } |
25 | 32 |
database/seeders/EmployersMainSeeder.php
File was created | 1 | <?php | |
2 | |||
3 | namespace Database\Seeders; | ||
4 | |||
5 | use App\Models\employers_main; | ||
6 | use Illuminate\Database\Console\Seeds\WithoutModelEvents; | ||
7 | use Illuminate\Database\Eloquent\Model; | ||
8 | use Illuminate\Database\Seeder; | ||
9 | |||
10 | class EmployersMainSeeder extends Seeder | ||
11 | { | ||
12 | /** | ||
13 | * Run the database seeds. | ||
14 | * | ||
15 | * @return void | ||
16 | */ | ||
17 | public function run() | ||
18 | { | ||
19 | $data = [ | ||
20 | /*1 */[ | ||
21 | 'name' => 'Пункт 1', | ||
22 | 'employer_id' => '0', | ||
23 | 'sort' => '100', | ||
24 | |||
25 | ], | ||
26 | /*2*/[ | ||
27 | 'name' => 'Пункт 2', | ||
28 | 'employer_id' => '0', | ||
29 | 'sort' => '110', | ||
30 | ], | ||
31 | /*3*/[ | ||
32 | 'name' => 'Пункт 3', | ||
33 | 'employer_id' => '0', | ||
34 | 'sort' => '120', | ||
35 | ], | ||
36 | /*4*/[ | ||
37 | 'name' => 'Пункт 4', | ||
38 | 'employer_id' => '0', | ||
39 | 'sort' => '130', | ||
40 | ], | ||
41 | /*5*/[ | ||
42 | 'name' => 'Пункт 5', | ||
43 | 'employer_id' => '0', | ||
44 | 'sort' => '140', | ||
45 | ], | ||
46 | /*6*/[ | ||
47 | 'name' => 'Пункт 6', | ||
48 | 'employer_id' => '0', | ||
49 | 'sort' => '150', | ||
50 | ], | ||
51 | /*7*/[ | ||
52 | 'name' => 'Пункт 7', | ||
53 | 'employer_id' => '0', | ||
54 | 'sort' => '160', | ||
55 | ], | ||
56 | /*8*/[ | ||
57 | 'name' => 'Пункт 8', | ||
58 | 'employer_id' => '0', | ||
59 | 'sort' => '170', | ||
60 | ], | ||
61 | ]; | ||
62 | |||
63 | foreach ($data as $item) { | ||
64 | $emp = new employers_main(); | ||
65 | $emp->name = $item['name']; | ||
66 | $emp->employer_id = $item['employer_id']; | ||
67 | $emp->sort = $item['sort']; | ||
68 | $emp->save(); | ||
69 | } | ||
70 | } | ||
71 | } | ||
72 |
database/seeders/JobTitlesMainSeeder.php
File was created | 1 | <?php | |
2 | |||
3 | namespace Database\Seeders; | ||
4 | |||
5 | use App\Models\job_titles_main; | ||
6 | use Illuminate\Database\Console\Seeds\WithoutModelEvents; | ||
7 | use Illuminate\Database\Eloquent\Model; | ||
8 | use Illuminate\Database\Seeder; | ||
9 | |||
10 | class JobTitlesMainSeeder extends Seeder | ||
11 | { | ||
12 | /** | ||
13 | * Run the database seeds. | ||
14 | * | ||
15 | * @return void | ||
16 | */ | ||
17 | public function run() | ||
18 | { | ||
19 | $data = [ | ||
20 | /*1 */[ | ||
21 | 'name' => 'Пункт 1', | ||
22 | 'job_title_id' => '0', | ||
23 | 'sort' => '100', | ||
24 | |||
25 | ], | ||
26 | /*2*/[ | ||
27 | 'name' => 'Пункт 2', | ||
28 | 'job_title_id' => '0', | ||
29 | 'sort' => '110', | ||
30 | ], | ||
31 | /*3*/[ | ||
32 | 'name' => 'Пункт 3', | ||
33 | 'job_title_id' => '0', | ||
34 | 'sort' => '120', | ||
35 | ], | ||
36 | /*4*/[ | ||
37 | 'name' => 'Пункт 4', | ||
38 | 'job_title_id' => '0', | ||
39 | 'sort' => '130', | ||
40 | ], | ||
41 | /*5*/[ | ||
42 | 'name' => 'Пункт 5', | ||
43 | 'job_title_id' => '0', | ||
44 | 'sort' => '140', | ||
45 | ], | ||
46 | /*6*/[ | ||
47 | 'name' => 'Пункт 6', | ||
48 | 'job_title_id' => '0', | ||
49 | 'sort' => '150', | ||
50 | ], | ||
51 | /*7*/[ | ||
52 | 'name' => 'Пункт 7', | ||
53 | 'job_title_id' => '0', | ||
54 | 'sort' => '160', | ||
55 | ], | ||
56 | /*8*/[ | ||
57 | 'name' => 'Пункт 8', | ||
58 | 'job_title_id' => '0', | ||
59 | 'sort' => '170', | ||
60 | ], | ||
61 | ]; | ||
62 | |||
63 | foreach ($data as $item) { | ||
64 | $emp = new job_titles_main(); | ||
65 | $emp->name = $item['name']; | ||
66 | $emp->job_title_id = $item['job_title_id']; | ||
67 | $emp->sort = $item['sort']; | ||
68 | $emp->save(); | ||
69 | } | ||
70 | } | ||
71 | } | ||
72 |
resources/views/admin/category/index.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Категории']) | 1 | @extends('layout.admin', ['title' => 'Админка - Категории']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | ||
5 | $(document).ready(function() { | ||
6 | $(document).on('click', '.checkban', function () { | ||
7 | var this_ = $(this); | ||
8 | var value = this_.val(); | ||
9 | var ajax_block = $('#ajax_block'); | ||
10 | var bool = 0; | ||
11 | 4 | ||
12 | if(this.checked){ | ||
13 | bool = 1; | ||
14 | } else { | ||
15 | bool = 0; | ||
16 | } | ||
17 | |||
18 | $.ajax({ | ||
19 | type: "GET", | ||
20 | url: "{{ url()->full()}}", | ||
21 | data: "id=" + value + "&is_ban=" + bool, | ||
22 | success: function (data) { | ||
23 | console.log('Обновление таблицы пользователей '); | ||
24 | //data = JSON.parse(data); | ||
25 | console.log(data); | ||
26 | ajax_block.html(data); | ||
27 | }, | ||
28 | headers: { | ||
29 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
30 | }, | ||
31 | error: function (data) { | ||
32 | console.log('Error: ' + data); | ||
33 | } | ||
34 | }); | ||
35 | }); | ||
36 | |||
37 | }); | ||
38 | </script> | ||
39 | @endsection | 5 | @endsection |
40 | 6 | ||
41 | @section('search') | 7 | @section('search') |
42 | <div class="absolute inset-y-0 flex items-center pl-2"> | 8 | <!--<div class="absolute inset-y-0 flex items-center pl-2"> |
43 | <svg | 9 | <svg |
44 | class="w-4 h-4" | 10 | class="w-4 h-4" |
45 | aria-hidden="true" | 11 | aria-hidden="true" |
46 | fill="currentColor" | 12 | fill="currentColor" |
47 | viewBox="0 0 20 20" | 13 | viewBox="0 0 20 20" |
48 | > | 14 | > |
49 | <path | 15 | <path |
50 | fill-rule="evenodd" | 16 | fill-rule="evenodd" |
51 | d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" | 17 | d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" |
52 | clip-rule="evenodd" | 18 | clip-rule="evenodd" |
53 | ></path> | 19 | ></path> |
54 | </svg> | 20 | </svg> |
55 | </div> | 21 | </div> |
56 | <form action="" method="POST"> | 22 | <form action="" method="POST"> |
57 | <div style="float:left;"><input | 23 | <div style="float:left;"><input |
58 | class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" | 24 | class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" |
59 | style="width: 400px" | 25 | style="width: 400px" |
60 | type="text" | 26 | type="text" |
61 | placeholder="Искать..." | 27 | placeholder="Искать..." |
62 | aria-label="Search" | 28 | aria-label="Search" |
63 | /></div> | 29 | /></div> |
64 | <div style="float: left"> | 30 | <div style="float: left"> |
65 | <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> | 31 | <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> |
66 | </div> | 32 | </div> |
67 | </form> | 33 | </form>--> |
68 | @endsection | 34 | @endsection |
69 | 35 | ||
70 | @section('content') | 36 | @section('content') |
71 | 37 | ||
72 | <a href="{{ route('admin.categories.create') }}" style="width: 210px" class="px-5 py-3 font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> | 38 | <a href="{{ route('admin.categories.create') }}" style="width: 175px" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> |
73 | Добавить категорию | 39 | Добавить категорию |
74 | </a> | 40 | </a> |
75 | <br> | 41 | <br> |
76 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 42 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
77 | 43 | ||
78 | <div class="w-full overflow-x-auto"> | 44 | <div class="w-full overflow-x-auto"> |
79 | <table class="w-full whitespace-no-wrap"> | 45 | <table class="w-full whitespace-no-wrap"> |
80 | <thead> | 46 | <thead> |
81 | <tr | 47 | <tr |
82 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | 48 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" |
83 | > | 49 | > |
84 | <th class="px-4 py-3">№</th> | 50 | <th class="px-4 py-3">№</th> |
85 | <th class="px-4 py-3">Название категории</th> | 51 | <th class="px-4 py-3">Название категории</th> |
86 | <th class="px-4 py-3">Дата создания</th> | 52 | <th class="px-4 py-3">Дата создания</th> |
87 | <th class="px-4 py-3">Редактировать</th> | 53 | <th class="px-4 py-3">Редактировать</th> |
88 | </tr> | 54 | </tr> |
89 | </thead> | 55 | </thead> |
90 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 56 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
91 | @foreach($category as $cat) | 57 | @foreach($category as $cat) |
92 | <tr class="text-gray-700 dark:text-gray-400"> | 58 | <tr class="text-gray-700 dark:text-gray-400"> |
93 | <td class="px-4 py-3"> | 59 | <td class="px-4 py-3"> |
94 | {{$cat->id}} | 60 | {{$cat->id}} |
95 | </td> | 61 | </td> |
96 | <td class="px-4 py-3"> | 62 | <td class="px-4 py-3"> |
97 | {{$cat->name}} | 63 | {{$cat->name}} |
98 | </td> | 64 | </td> |
99 | <td class="px-4 py-3"> | 65 | <td class="px-4 py-3"> |
100 | {{$cat->created_at}} | 66 | {{$cat->created_at}} |
101 | </td> | 67 | </td> |
102 | <td class="px-4 py-3 text-sm_"> | 68 | <td class="px-4 py-3 text-sm_"> |
103 | <form action="{{ route('admin.categories.destroy', ['category' => $cat->id]) }}" method="POST"> | 69 | <form action="{{ route('admin.categories.destroy', ['category' => $cat->id]) }}" method="POST"> |
104 | <a href="{{ route('admin.categories.edit', ['category' => $cat->id]) }}">Изменить</a> | | 70 | <a href="{{ route('admin.categories.edit', ['category' => $cat->id]) }}">Изменить</a> | |
105 | @csrf | 71 | @csrf |
106 | @method('DELETE') | 72 | @method('DELETE') |
107 | <input class="btn btn-danger" type="submit" value="Удалить"/> | 73 | <input class="btn btn-danger" type="submit" value="Удалить"/> |
108 | </form> | 74 | </form> |
109 | </td> | 75 | </td> |
110 | </tr> | 76 | </tr> |
111 | @endforeach | 77 | @endforeach |
112 | </tbody> | 78 | </tbody> |
113 | </table> | 79 | </table> |
114 | </div> | 80 | </div> |
115 | 81 | ||
116 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | 82 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> |
117 | <?=$category->appends($_GET)->links('admin.pagginate'); ?> | 83 | <?=$category->appends($_GET)->links('admin.pagginate'); ?> |
118 | </div> | 84 | </div> |
119 | </div> | 85 | </div> |
120 | @endsection | 86 | @endsection |
121 | 87 |
resources/views/admin/employer_main/index.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Админка - Работодатели на главной']) | |
2 | |||
3 | @section('script') | ||
4 | <script> | ||
5 | $(document).ready(function() { | ||
6 | $(document).on('change', '.check_js', function () { | ||
7 | var this_ = $(this); | ||
8 | var id = this_.attr('id'); | ||
9 | var field = this_.attr('data-field'); | ||
10 | var value = this_.val(); | ||
11 | var ajax_block = $('#ajax_block'); | ||
12 | var str ="id=" + id + "&"+ field + "=" + value; | ||
13 | console.log(str); | ||
14 | $.ajax({ | ||
15 | type: "GET", | ||
16 | url: "{{ url()->full()}}", | ||
17 | data: str, | ||
18 | success: function (data) { | ||
19 | console.log('Обновление таблицы пользователей '); | ||
20 | //data = JSON.parse(data); | ||
21 | //console.log(data); | ||
22 | ajax_block.html(data); | ||
23 | }, | ||
24 | headers: { | ||
25 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
26 | }, | ||
27 | error: function (data) { | ||
28 | console.log('Error: ' + data); | ||
29 | } | ||
30 | }); | ||
31 | }); | ||
32 | |||
33 | }); | ||
34 | </script> | ||
35 | @endsection | ||
36 | |||
37 | @section('search') | ||
38 | <!--<div class="absolute inset-y-0 flex items-center pl-2"> | ||
39 | <svg | ||
40 | class="w-4 h-4" | ||
41 | aria-hidden="true" | ||
42 | fill="currentColor" | ||
43 | viewBox="0 0 20 20" | ||
44 | > | ||
45 | <path | ||
46 | fill-rule="evenodd" | ||
47 | d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" | ||
48 | clip-rule="evenodd" | ||
49 | ></path> | ||
50 | </svg> | ||
51 | </div> | ||
52 | <form action="" method="POST"> | ||
53 | <div style="float:left;"><input | ||
54 | class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" | ||
55 | style="width: 400px" | ||
56 | type="text" | ||
57 | placeholder="Искать..." | ||
58 | aria-label="Search" | ||
59 | /></div> | ||
60 | <div style="float: left"> | ||
61 | <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> | ||
62 | </div> | ||
63 | </form>--> | ||
64 | @endsection | ||
65 | |||
66 | @section('content') | ||
67 | <style> | ||
68 | .col { | ||
69 | width: 250px; /* Ширина блока */ | ||
70 | word-wrap: break-word; /* Перенос слов */ | ||
71 | word-break: break-all; | ||
72 | } | ||
73 | </style> | ||
74 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | ||
75 | <div class="w-full overflow-x-auto"> | ||
76 | <table class="w-full whitespace-no-wrap"> | ||
77 | <thead> | ||
78 | <tr | ||
79 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | ||
80 | > | ||
81 | <th class="px-4 py-3">№</th> | ||
82 | <th class="px-4 py-3">Название пункта</th> | ||
83 | <th class="px-4 py-3">Название компании</th> | ||
84 | <th class="px-4 py-3">Сортировка</th> | ||
85 | </tr> | ||
86 | </thead> | ||
87 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | ||
88 | <? foreach($employers as $emp) {?> | ||
89 | <tr class="text-gray-700 dark:text-gray-400"> | ||
90 | <td class="px-4 py-3"> | ||
91 | {{$emp->id}} | ||
92 | </td> | ||
93 | <td class="px-4 py-3"> | ||
94 | {{$emp->name}} | ||
95 | </td> | ||
96 | <td class="px-4 py-3"> | ||
97 | <select name="employer_id{{$emp->employer_id}}" id="{{$emp->id}}" data-field="employer_id" class="form-control check_js"> | ||
98 | <option value="0" | ||
99 | @if($emp->employer_id == 0) | ||
100 | selected | ||
101 | @endif | ||
102 | >Не указано</option> | ||
103 | @isset($list_employers) | ||
104 | @foreach($list_employers as $lemp) | ||
105 | <option value="{{ $lemp->id }}" | ||
106 | @if($lemp->id == $emp->employer_id) | ||
107 | selected | ||
108 | @endif | ||
109 | >{{ $lemp->name_company }} ({{ $lemp->id }})</option> | ||
110 | @endforeach | ||
111 | @endisset | ||
112 | </select> | ||
113 | </td> | ||
114 | <td class="px-4 py-3 text-sm"> | ||
115 | <select name="sort{{$emp->employer_id}}" id="{{$emp->id}}" data-field="sort" class="form-control check_js"> | ||
116 | <option value="100" @if($emp->sort == '100') selected @endif>100</option> | ||
117 | <option value="110" @if($emp->sort == '110') selected @endif>110</option> | ||
118 | <option value="120" @if($emp->sort == '120') selected @endif>120</option> | ||
119 | <option value="130" @if($emp->sort == '130') selected @endif>130</option> | ||
120 | <option value="140" @if($emp->sort == '140') selected @endif>140</option> | ||
121 | <option value="150" @if($emp->sort == '150') selected @endif>150</option> | ||
122 | <option value="160" @if($emp->sort == '160') selected @endif>160</option> | ||
123 | <option value="170" @if($emp->sort == '170') selected @endif>170</option> | ||
124 | <option value="180" @if($emp->sort == '180') selected @endif>180</option> | ||
125 | <option value="190" @if($emp->sort == '190') selected @endif>190</option> | ||
126 | <option value="200" @if($emp->sort == '200') selected @endif>200</option> | ||
127 | </select> | ||
128 | </td> | ||
129 | </tr> | ||
130 | <? } ?> | ||
131 | </tbody> | ||
132 | </table> | ||
133 | </div> | ||
134 | |||
135 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | ||
136 | <?=$employers->appends($_GET)->links('admin.pagginate'); ?> | ||
137 | </div> | ||
138 | </div> | ||
139 | @endsection | ||
140 |
resources/views/admin/employer_main/index_ajax.blade.php
File was created | 1 | <div class="w-full overflow-x-auto"> | |
2 | <table class="w-full whitespace-no-wrap"> | ||
3 | <thead> | ||
4 | <tr | ||
5 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | ||
6 | > | ||
7 | <th class="px-4 py-3">№</th> | ||
8 | <th class="px-4 py-3">Название пункта</th> | ||
9 | <th class="px-4 py-3">Название компании</th> | ||
10 | <th class="px-4 py-3">Сортировка</th> | ||
11 | </tr> | ||
12 | </thead> | ||
13 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | ||
14 | <? foreach($employers as $emp) {?> | ||
15 | <tr class="text-gray-700 dark:text-gray-400"> | ||
16 | <td class="px-4 py-3"> | ||
17 | {{$emp->id}} | ||
18 | </td> | ||
19 | <td class="px-4 py-3"> | ||
20 | {{$emp->name}} | ||
21 | </td> | ||
22 | <td class="px-4 py-3"> | ||
23 | <select name="employer_id{{$emp->employer_id}}" id="{{$emp->id}}" data-field="employer_id" class="form-control check_js"> | ||
24 | <option value="0" | ||
25 | @if($emp->employer_id == 0) | ||
26 | selected | ||
27 | @endif | ||
28 | >Не указано</option> | ||
29 | @isset($list_employers) | ||
30 | @foreach($list_employers as $lemp) | ||
31 | <option value="{{ $lemp->id }}" | ||
32 | @if($lemp->id == $emp->employer_id) | ||
33 | selected | ||
34 | @endif | ||
35 | >{{ $lemp->name_company }} ({{ $lemp->id }})</option> | ||
36 | @endforeach | ||
37 | @endisset | ||
38 | </select> | ||
39 | </td> | ||
40 | <td class="px-4 py-3 text-sm"> | ||
41 | <select name="sort{{$emp->employer_id}}" id="{{$emp->id}}" data-field="sort" class="form-control check_js"> | ||
42 | <option value="100" @if($emp->sort == '100') selected @endif>100</option> | ||
43 | <option value="110" @if($emp->sort == '110') selected @endif>110</option> | ||
44 | <option value="120" @if($emp->sort == '120') selected @endif>120</option> | ||
45 | <option value="130" @if($emp->sort == '130') selected @endif>130</option> | ||
46 | <option value="140" @if($emp->sort == '140') selected @endif>140</option> | ||
47 | <option value="150" @if($emp->sort == '150') selected @endif>150</option> | ||
48 | <option value="160" @if($emp->sort == '160') selected @endif>160</option> | ||
49 | <option value="170" @if($emp->sort == '170') selected @endif>170</option> | ||
50 | <option value="180" @if($emp->sort == '180') selected @endif>180</option> | ||
51 | <option value="190" @if($emp->sort == '190') selected @endif>190</option> | ||
52 | <option value="200" @if($emp->sort == '200') selected @endif>200</option> | ||
53 | </select> | ||
54 | </td> | ||
55 | </tr> | ||
56 | <? } ?> | ||
57 | </tbody> | ||
58 | </table> | ||
59 | </div> | ||
60 | |||
61 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | ||
62 | <?=$employers->appends($_GET)->links('admin.pagginate'); ?> | ||
63 | </div> | ||
64 |
resources/views/admin/job_main/index.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Админка - Должности на главной']) | |
2 | |||
3 | @section('script') | ||
4 | <script> | ||
5 | $(document).ready(function() { | ||
6 | $(document).on('change', '.check_js', function () { | ||
7 | var this_ = $(this); | ||
8 | var id = this_.attr('id'); | ||
9 | var field = this_.attr('data-field'); | ||
10 | var value = this_.val(); | ||
11 | var ajax_block = $('#ajax_block'); | ||
12 | var str ="id=" + id + "&"+ field + "=" + value; | ||
13 | console.log(str); | ||
14 | $.ajax({ | ||
15 | type: "GET", | ||
16 | url: "{{ url()->full()}}", | ||
17 | data: str, | ||
18 | success: function (data) { | ||
19 | console.log('Обновление таблицы пользователей '); | ||
20 | //data = JSON.parse(data); | ||
21 | //console.log(data); | ||
22 | ajax_block.html(data); | ||
23 | }, | ||
24 | headers: { | ||
25 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
26 | }, | ||
27 | error: function (data) { | ||
28 | console.log('Error: ' + data); | ||
29 | } | ||
30 | }); | ||
31 | }); | ||
32 | |||
33 | }); | ||
34 | </script> | ||
35 | @endsection | ||
36 | |||
37 | @section('search') | ||
38 | <!--<div class="absolute inset-y-0 flex items-center pl-2"> | ||
39 | <svg | ||
40 | class="w-4 h-4" | ||
41 | aria-hidden="true" | ||
42 | fill="currentColor" | ||
43 | viewBox="0 0 20 20" | ||
44 | > | ||
45 | <path | ||
46 | fill-rule="evenodd" | ||
47 | d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" | ||
48 | clip-rule="evenodd" | ||
49 | ></path> | ||
50 | </svg> | ||
51 | </div> | ||
52 | <form action="" method="POST"> | ||
53 | <div style="float:left;"><input | ||
54 | class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" | ||
55 | style="width: 400px" | ||
56 | type="text" | ||
57 | placeholder="Искать..." | ||
58 | aria-label="Search" | ||
59 | /></div> | ||
60 | <div style="float: left"> | ||
61 | <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> | ||
62 | </div> | ||
63 | </form>--> | ||
64 | @endsection | ||
65 | |||
66 | @section('content') | ||
67 | <style> | ||
68 | .col { | ||
69 | width: 250px; /* Ширина блока */ | ||
70 | word-wrap: break-word; /* Перенос слов */ | ||
71 | word-break: break-all; | ||
72 | } | ||
73 | </style> | ||
74 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | ||
75 | <div class="w-full overflow-x-auto"> | ||
76 | <table class="w-full whitespace-no-wrap"> | ||
77 | <thead> | ||
78 | <tr | ||
79 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | ||
80 | > | ||
81 | <th class="px-4 py-3">№</th> | ||
82 | <th class="px-4 py-3">Название пункта</th> | ||
83 | <th class="px-4 py-3">Должность</th> | ||
84 | <th class="px-4 py-3">Сортировка</th> | ||
85 | </tr> | ||
86 | </thead> | ||
87 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | ||
88 | <? foreach($jobs as $job) {?> | ||
89 | <tr class="text-gray-700 dark:text-gray-400"> | ||
90 | <td class="px-4 py-3"> | ||
91 | {{$job->id}} | ||
92 | </td> | ||
93 | <td class="px-4 py-3"> | ||
94 | {{$job->name}} | ||
95 | </td> | ||
96 | <td class="px-4 py-3"> | ||
97 | <select name="job_title_id{{$job->id}}" id="{{$job->id}}" data-field="job_title_id" class="form-control check_js"> | ||
98 | <option value="0" | ||
99 | @if($job->job_title_id == 0) | ||
100 | selected | ||
101 | @endif | ||
102 | >Не указано</option> | ||
103 | @isset($list_job_titles) | ||
104 | @foreach($list_job_titles as $job_title) | ||
105 | <option value="{{ $job_title->id }}" | ||
106 | @if($job_title->id == $job->job_title_id) | ||
107 | selected | ||
108 | @endif | ||
109 | >{{ $job_title->name }} ({{ $job_title->id }})</option> | ||
110 | @endforeach | ||
111 | @endisset | ||
112 | </select> | ||
113 | </td> | ||
114 | <td class="px-4 py-3 text-sm"> | ||
115 | <select name="sort{{$job->id}}" id="{{$job->id}}" data-field="sort" class="form-control check_js"> | ||
116 | <option value="100" @if($job->sort == '100') selected @endif>100</option> | ||
117 | <option value="110" @if($job->sort == '110') selected @endif>110</option> | ||
118 | <option value="120" @if($job->sort == '120') selected @endif>120</option> | ||
119 | <option value="130" @if($job->sort == '130') selected @endif>130</option> | ||
120 | <option value="140" @if($job->sort == '140') selected @endif>140</option> | ||
121 | <option value="150" @if($job->sort == '150') selected @endif>150</option> | ||
122 | <option value="160" @if($job->sort == '160') selected @endif>160</option> | ||
123 | <option value="170" @if($job->sort == '170') selected @endif>170</option> | ||
124 | <option value="180" @if($job->sort == '180') selected @endif>180</option> | ||
125 | <option value="190" @if($job->sort == '190') selected @endif>190</option> | ||
126 | <option value="200" @if($job->sort == '200') selected @endif>200</option> | ||
127 | </select> | ||
128 | </td> | ||
129 | </tr> | ||
130 | <? } ?> | ||
131 | </tbody> | ||
132 | </table> | ||
133 | </div> | ||
134 | |||
135 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | ||
136 | <?=$jobs->appends($_GET)->links('admin.pagginate'); ?> | ||
137 | </div> | ||
138 | </div> | ||
139 | @endsection | ||
140 |
resources/views/admin/job_main/index_ajax.blade.php
File was created | 1 | <div class="w-full overflow-x-auto"> | |
2 | <table class="w-full whitespace-no-wrap"> | ||
3 | <thead> | ||
4 | <tr | ||
5 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | ||
6 | > | ||
7 | <th class="px-4 py-3">№</th> | ||
8 | <th class="px-4 py-3">Название пункта</th> | ||
9 | <th class="px-4 py-3">Должность</th> | ||
10 | <th class="px-4 py-3">Сортировка</th> | ||
11 | </tr> | ||
12 | </thead> | ||
13 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | ||
14 | <? foreach($jobs as $job) {?> | ||
15 | <tr class="text-gray-700 dark:text-gray-400"> | ||
16 | <td class="px-4 py-3"> | ||
17 | {{$job->id}} | ||
18 | </td> | ||
19 | <td class="px-4 py-3"> | ||
20 | {{$job->name}} | ||
21 | </td> | ||
22 | <td class="px-4 py-3"> | ||
23 | <select name="job_title_id{{$job->id}}" id="{{$job->id}}" data-field="job_title_id" class="form-control check_js"> | ||
24 | <option value="0" | ||
25 | @if($job->job_title_id == 0) | ||
26 | selected | ||
27 | @endif | ||
28 | >Не указано</option> | ||
29 | @isset($list_job_titles) | ||
30 | @foreach($list_job_titles as $job_title) | ||
31 | <option value="{{ $job_title->id }}" | ||
32 | @if($job_title->id == $job->job_title_id) | ||
33 | selected | ||
34 | @endif | ||
35 | >{{ $job_title->name }} ({{ $job_title->id }})</option> | ||
36 | @endforeach | ||
37 | @endisset | ||
38 | </select> | ||
39 | </td> | ||
40 | <td class="px-4 py-3 text-sm"> | ||
41 | <select name="sort{{$job->id}}" id="{{$job->id}}" data-field="sort" class="form-control check_js"> | ||
42 | <option value="100" @if($job->sort == '100') selected @endif>100</option> | ||
43 | <option value="110" @if($job->sort == '110') selected @endif>110</option> | ||
44 | <option value="120" @if($job->sort == '120') selected @endif>120</option> | ||
45 | <option value="130" @if($job->sort == '130') selected @endif>130</option> | ||
46 | <option value="140" @if($job->sort == '140') selected @endif>140</option> | ||
47 | <option value="150" @if($job->sort == '150') selected @endif>150</option> | ||
48 | <option value="160" @if($job->sort == '160') selected @endif>160</option> | ||
49 | <option value="170" @if($job->sort == '170') selected @endif>170</option> | ||
50 | <option value="180" @if($job->sort == '180') selected @endif>180</option> | ||
51 | <option value="190" @if($job->sort == '190') selected @endif>190</option> | ||
52 | <option value="200" @if($job->sort == '200') selected @endif>200</option> | ||
53 | </select> | ||
54 | </td> | ||
55 | </tr> | ||
56 | <? } ?> | ||
57 | </tbody> | ||
58 | </table> | ||
59 | </div> | ||
60 | |||
61 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | ||
62 | <?=$jobs->appends($_GET)->links('admin.pagginate'); ?> | ||
63 | </div> | ||
64 |
resources/views/admin/messages.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Вакансии']) | 1 | @extends('layout.admin', ['title' => 'Админка - Сообщения']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | @endsection | 4 | @endsection |
5 | 5 | ||
6 | @section('search') | 6 | @section('search') |
7 | <!--<div class="absolute inset-y-0 flex items-center pl-2"> | 7 | <!--<div class="absolute inset-y-0 flex items-center pl-2"> |
8 | <svg | 8 | <svg |
9 | class="w-4 h-4" | 9 | class="w-4 h-4" |
10 | aria-hidden="true" | 10 | aria-hidden="true" |
11 | fill="currentColor" | 11 | fill="currentColor" |
12 | viewBox="0 0 20 20" | 12 | viewBox="0 0 20 20" |
13 | > | 13 | > |
14 | <path | 14 | <path |
15 | fill-rule="evenodd" | 15 | fill-rule="evenodd" |
16 | d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" | 16 | d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" |
17 | clip-rule="evenodd" | 17 | clip-rule="evenodd" |
18 | ></path> | 18 | ></path> |
19 | </svg> | 19 | </svg> |
20 | </div> | 20 | </div> |
21 | <form action="" method="POST"> | 21 | <form action="" method="POST"> |
22 | <div style="float:left;"><input | 22 | <div style="float:left;"><input |
23 | class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" | 23 | class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" |
24 | style="width: 400px" | 24 | style="width: 400px" |
25 | type="text" | 25 | type="text" |
26 | placeholder="Искать компанию или вакансию" | 26 | placeholder="Искать компанию или вакансию" |
27 | aria-label="Search" | 27 | aria-label="Search" |
28 | /></div> | 28 | /></div> |
29 | <div style="float: left"> | 29 | <div style="float: left"> |
30 | <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Поиск</button> | 30 | <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Поиск</button> |
31 | </div> | 31 | </div> |
32 | </form>--> | 32 | </form>--> |
33 | @endsection | 33 | @endsection |
34 | 34 | ||
35 | @section('content') | 35 | @section('content') |
36 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 36 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
37 | <div class="w-full overflow-x-auto"> | 37 | <div class="w-full overflow-x-auto"> |
38 | <table class="w-full whitespace-no-wrap"> | 38 | <table class="w-full whitespace-no-wrap"> |
39 | <thead> | 39 | <thead> |
40 | <tr | 40 | <tr |
41 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | 41 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" |
42 | > | 42 | > |
43 | <th class="px-4 py-3">№</th> | 43 | <th class="px-4 py-3">№</th> |
44 | <th class="px-4 py-3">От юзера</th> | 44 | <th class="px-4 py-3">От юзера</th> |
45 | <th class="px-4 py-3">К юзеру</th> | 45 | <th class="px-4 py-3">К юзеру</th> |
46 | <th class="px-4 py-3">Заголовок</th> | 46 | <th class="px-4 py-3">Заголовок</th> |
47 | <th class="px-4 py-3">Отклик</th> | 47 | <th class="px-4 py-3">Отклик</th> |
48 | <th class="px-4 py-3">Дата</th> | 48 | <th class="px-4 py-3">Дата</th> |
49 | </tr> | 49 | </tr> |
50 | </thead> | 50 | </thead> |
51 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 51 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
52 | @foreach($Msgs as $msg) | 52 | @foreach($Msgs as $msg) |
53 | <tr class="text-gray-700 dark:text-gray-400"> | 53 | <tr class="text-gray-700 dark:text-gray-400"> |
54 | <td class="px-4 py-3"> | 54 | <td class="px-4 py-3"> |
55 | {{$msg->id}} | 55 | {{$msg->id}} |
56 | </td> | 56 | </td> |
57 | <td class="px-4 py-3"> | 57 | <td class="px-4 py-3"> |
58 | {{$msg->user_from->name}} ({{$msg->user_from->id}}) | 58 | {{$msg->user_from->name}} ({{$msg->user_from->id}}) |
59 | </td> | 59 | </td> |
60 | <td class="px-4 py-3"> | 60 | <td class="px-4 py-3"> |
61 | {{$msg->user_to->name}} ({{$msg->user_to->id}}) | 61 | {{$msg->user_to->name}} ({{$msg->user_to->id}}) |
62 | </td> | 62 | </td> |
63 | <td class="px-4 py-3"> | 63 | <td class="px-4 py-3"> |
64 | {{$msg->title}} | 64 | {{$msg->title}} |
65 | </td> | 65 | </td> |
66 | <td class="px-4 py-3"> | 66 | <td class="px-4 py-3"> |
67 | <div class="flex items-center text-sm"> | 67 | <div class="flex items-center text-sm"> |
68 | <div> | 68 | <div> |
69 | @if ($msg->response->count()) | 69 | @if ($msg->response->count()) |
70 | Да | 70 | Да |
71 | @else | 71 | @else |
72 | Нет | 72 | Нет |
73 | @endif | 73 | @endif |
74 | </div> | 74 | </div> |
75 | </div> | 75 | </div> |
76 | </td> | 76 | </td> |
77 | <td class="px-4 py-3 text-sm"> | 77 | <td class="px-4 py-3 text-sm"> |
78 | {{ $msg->created_at }} | 78 | {{ $msg->created_at }} |
79 | </td> | 79 | </td> |
80 | </tr> | 80 | </tr> |
81 | @endforeach | 81 | @endforeach |
82 | </tbody> | 82 | </tbody> |
83 | </table> | 83 | </table> |
84 | </div> | 84 | </div> |
85 | 85 | ||
86 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | 86 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> |
87 | <?=$Msgs->appends($_GET)->links('admin.pagginate'); ?> | 87 | <?=$Msgs->appends($_GET)->links('admin.pagginate'); ?> |
88 | </div> | 88 | </div> |
89 | </div> | 89 | </div> |
90 | @endsection | 90 | @endsection |
91 | 91 |
resources/views/admin/pages/add.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Админка - Добавление страницы']) | |
2 | |||
3 | @section('content') | ||
4 | <form method="POST" action="{{ route('admin.add-page-store') }}"> | ||
5 | @include('admin.pages.form') | ||
6 | </form> | ||
7 | @endsection | ||
8 |
resources/views/admin/pages/edit.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Админка - Редактирование страницы']) | |
2 | |||
3 | @section('content') | ||
4 | <form method="POST" action="{{ route('admin.update-page', ['page' => $page->id]) }}"> | ||
5 | @include('admin.pages.form') | ||
6 | </form> | ||
7 | @endsection | ||
8 |
resources/views/admin/pages/form.blade.php
File was created | 1 | @csrf | |
2 | |||
3 | @isset($page) | ||
4 | @method('PUT') | ||
5 | @endisset | ||
6 | |||
7 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> | ||
8 | |||
9 | <label class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> | ||
10 | <label class="block text-sm"> | ||
11 | <span class="text-gray-700 dark:text-gray-400">Название страницы</span> | ||
12 | <input name="name" id="name" | ||
13 | class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | ||
14 | placeholder="Имя категории" value="{{ old('name') ?? $page->name ?? '' }}" | ||
15 | /> | ||
16 | @error('name') | ||
17 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
18 | {{ $message }} | ||
19 | </span> | ||
20 | @enderror | ||
21 | </label><br> | ||
22 | |||
23 | <label class="block text-sm"> | ||
24 | <span class="text-gray-700 dark:text-gray-400">Английский псевдоним страницы</span> | ||
25 | <input name="slug" id="slug" | ||
26 | class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | ||
27 | placeholder="Имя категории" value="{{ old('slug') ?? $page->slug ?? '' }}" | ||
28 | /> | ||
29 | @error('slug') | ||
30 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
31 | {{ $message }} | ||
32 | </span> | ||
33 | @enderror | ||
34 | </label><br> | ||
35 | |||
36 | <label class="block text-sm"> | ||
37 | <span class="text-gray-700 dark:text-gray-400">Анонс</span> | ||
38 | <textarea class="form-control ckeditor" name="anons" placeholder="Анонс (html)" required | ||
39 | rows="10">{{ old('anons') ?? $page->anons ?? '' }}</textarea> | ||
40 | @error('anons') | ||
41 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
42 | {{ $message }} | ||
43 | </span> | ||
44 | @enderror | ||
45 | </label><br> | ||
46 | |||
47 | <label class="block text-sm"> | ||
48 | <span class="text-gray-700 dark:text-gray-400">Текст</span> | ||
49 | <textarea class="form-control ckeditor" name="text" placeholder="Текст (html)" required | ||
50 | rows="10">{{ old('text') ?? $page->text ?? '' }}</textarea> | ||
51 | @error('text') | ||
52 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
53 | {{ $message }} | ||
54 | </span> | ||
55 | @enderror | ||
56 | </label><br> | ||
57 | |||
58 | <label class="block text-sm"> | ||
59 | <span class="text-gray-700 dark:text-gray-400">Автор</span> | ||
60 | <input name="author" id="author" | ||
61 | class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | ||
62 | placeholder="Имя категории" value="{{ old('author') ?? $page->author ?? '' }}" | ||
63 | /> | ||
64 | @error('author') | ||
65 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
66 | {{ $message }} | ||
67 | </span> | ||
68 | @enderror | ||
69 | </label><br> | ||
70 | |||
71 | <label class="block text-sm"> | ||
72 | <input type="file" class="form-control-file" name="image" accept="image/png, image/jpeg"> | ||
73 | </label> | ||
74 | |||
75 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> | ||
76 | <div> | ||
77 | <button type="submit" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> | ||
78 | Сохранить | ||
79 | </button> | ||
80 | </div> | ||
81 | </div> | ||
82 | </div> | ||
83 |
resources/views/admin/pages/index.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Админка - Страницы сайта']) | |
2 | |||
3 | @section('script') | ||
4 | |||
5 | @endsection | ||
6 | |||
7 | @section('search') | ||
8 | <!--<div class="absolute inset-y-0 flex items-center pl-2"> | ||
9 | <svg | ||
10 | class="w-4 h-4" | ||
11 | aria-hidden="true" | ||
12 | fill="currentColor" | ||
13 | viewBox="0 0 20 20" | ||
14 | > | ||
15 | <path | ||
16 | fill-rule="evenodd" | ||
17 | d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" | ||
18 | clip-rule="evenodd" | ||
19 | ></path> | ||
20 | </svg> | ||
21 | </div> | ||
22 | <form action="" method="POST"> | ||
23 | <div style="float:left;"><input | ||
24 | class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" | ||
25 | style="width: 400px" | ||
26 | type="text" | ||
27 | placeholder="Искать..." | ||
28 | aria-label="Search" | ||
29 | /></div> | ||
30 | <div style="float: left"> | ||
31 | <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> | ||
32 | </div> | ||
33 | </form>--> | ||
34 | @endsection | ||
35 | |||
36 | @section('content') | ||
37 | |||
38 | <a href="{{ route('admin.add-page') }}" style="width: 170px" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> | ||
39 | Добавить страницу | ||
40 | </a> | ||
41 | <br> | ||
42 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | ||
43 | |||
44 | <div class="w-full overflow-x-auto"> | ||
45 | <table class="w-full whitespace-no-wrap"> | ||
46 | <thead> | ||
47 | <tr | ||
48 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | ||
49 | > | ||
50 | <th class="px-4 py-3">№</th> | ||
51 | <th class="px-4 py-3">Название страницы</th> | ||
52 | <th class="px-4 py-3">Адрес</th> | ||
53 | <th class="px-4 py-3">Дата создания</th> | ||
54 | <th class="px-4 py-3">Редактировать</th> | ||
55 | </tr> | ||
56 | </thead> | ||
57 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | ||
58 | @foreach($pages as $page) | ||
59 | <tr class="text-gray-700 dark:text-gray-400"> | ||
60 | <td class="px-4 py-3"> | ||
61 | {{$page->id}} | ||
62 | </td> | ||
63 | <td class="px-4 py-3"> | ||
64 | {{$page->name}} | ||
65 | </td> | ||
66 | <td class="px-4 py-3"> | ||
67 | {{ action([\App\Http\Controllers\PagesController::class, 'pages'], ['slug' => $page->slug]) }} | ||
68 | </td> | ||
69 | <td class="px-4 py-3"> | ||
70 | {{$page->created_at}} | ||
71 | </td> | ||
72 | <td class="px-4 py-3 text-sm_"> | ||
73 | <form action="{{ route('admin.delete-page', ['page' => $page->id]) }}" method="POST"> | ||
74 | <a href="{{ route('admin.edit-page', ['page' => $page->id]) }}">Изменить</a> | | ||
75 | @csrf | ||
76 | @method('DELETE') | ||
77 | <input class="btn btn-danger" type="submit" value="Удалить"/> | ||
78 | </form> | ||
79 | </td> | ||
80 | </tr> | ||
81 | @endforeach | ||
82 | </tbody> | ||
83 | </table> | ||
84 | </div> | ||
85 | |||
86 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | ||
87 | <?=$pages->appends($_GET)->links('admin.pagginate'); ?> | ||
88 | </div> | ||
89 | </div> | ||
90 | @endsection | ||
91 |
resources/views/admin/users/roles/index.blade.php
1 | @extends('layout.admin', ['title' => 'Роли пользователей']) | 1 | @extends('layout.admin', ['title' => 'Роли пользователей']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | 4 | <script> |
5 | $(document).ready(function() { | 5 | $(document).ready(function() { |
6 | $(document).on('click', '.check_click', function () { | 6 | $(document).on('click', '.check_click', function () { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var value = this_.val(); | 8 | var value = this_.val(); |
9 | var field = this_.attr('data-field'); | 9 | var field = this_.attr('data-field'); |
10 | var ajax_block = $('#ajax_block'); | 10 | var ajax_block = $('#ajax_block'); |
11 | var bool = 0; | 11 | var bool = 0; |
12 | var str_get = ''; | 12 | var str_get = ''; |
13 | 13 | ||
14 | if(this.checked){ | 14 | if(this.checked){ |
15 | bool = 1; | 15 | bool = 1; |
16 | } else { | 16 | } else { |
17 | bool = 0; | 17 | bool = 0; |
18 | } | 18 | } |
19 | console.log(field); | 19 | console.log(field); |
20 | str_get = "id=" + value + "&" + field + "=" + bool; | 20 | str_get = "id=" + value + "&" + field + "=" + bool; |
21 | console.log(str_get); | 21 | console.log(str_get); |
22 | 22 | ||
23 | $.ajax({ | 23 | $.ajax({ |
24 | type: "GET", | 24 | type: "GET", |
25 | url: "{{ url()->full()}}", | 25 | url: "{{ url()->full()}}", |
26 | data: str_get, | 26 | data: str_get, |
27 | success: function (data) { | 27 | success: function (data) { |
28 | console.log('Обновление таблицы пользователей '); | 28 | console.log('Обновление таблицы пользователей '); |
29 | //data = JSON.parse(data); | 29 | //data = JSON.parse(data); |
30 | //console.log(data); | 30 | //console.log(data); |
31 | ajax_block.html(data); | 31 | ajax_block.html(data); |
32 | }, | 32 | }, |
33 | headers: { | 33 | headers: { |
34 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 34 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
35 | }, | 35 | }, |
36 | error: function (data) { | 36 | error: function (data) { |
37 | console.log('Error: ' + data); | 37 | console.log('Error: ' + data); |
38 | } | 38 | } |
39 | }); | 39 | }); |
40 | }); | 40 | }); |
41 | }); | 41 | }); |
42 | </script> | 42 | </script> |
43 | @endsection | 43 | @endsection |
44 | 44 | ||
45 | @section('search') | 45 | @section('search') |
46 | <div class="absolute inset-y-0 flex items-center pl-2"> | 46 | <!--<div class="absolute inset-y-0 flex items-center pl-2"> |
47 | <svg | 47 | <svg |
48 | class="w-4 h-4" | 48 | class="w-4 h-4" |
49 | aria-hidden="true" | 49 | aria-hidden="true" |
50 | fill="currentColor" | 50 | fill="currentColor" |
51 | viewBox="0 0 20 20" | 51 | viewBox="0 0 20 20" |
52 | > | 52 | > |
53 | <path | 53 | <path |
54 | fill-rule="evenodd" | 54 | fill-rule="evenodd" |
55 | d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" | 55 | d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" |
56 | clip-rule="evenodd" | 56 | clip-rule="evenodd" |
57 | ></path> | 57 | ></path> |
58 | </svg> | 58 | </svg> |
59 | </div> | 59 | </div> |
60 | <form action="" method="POST"> | 60 | <form action="" method="POST"> |
61 | <div style="float:left;"><input | 61 | <div style="float:left;"><input |
62 | class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" | 62 | class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" |
63 | style="width: 400px" | 63 | style="width: 400px" |
64 | type="text" | 64 | type="text" |
65 | placeholder="Искать..." | 65 | placeholder="Искать..." |
66 | aria-label="Search" | 66 | aria-label="Search" |
67 | /></div> | 67 | /></div> |
68 | <div style="float: left"> | 68 | <div style="float: left"> |
69 | <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> | 69 | <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> |
70 | </div> | 70 | </div> |
71 | </form> | 71 | </form>--> |
72 | @endsection | 72 | @endsection |
73 | 73 | ||
74 | @section('content') | 74 | @section('content') |
75 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 75 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
76 | <div class="w-full overflow-x-auto"> | 76 | <div class="w-full overflow-x-auto"> |
77 | <table class="w-full whitespace-no-wrap"> | 77 | <table class="w-full whitespace-no-wrap"> |
78 | <thead> | 78 | <thead> |
79 | <tr | 79 | <tr |
80 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | 80 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" |
81 | > | 81 | > |
82 | <th class="px-4 py-3">№</th> | 82 | <th class="px-4 py-3">№</th> |
83 | <th class="px-4 py-3">Имя</th> | 83 | <th class="px-4 py-3">Имя</th> |
84 | <th class="px-4 py-3">Email/логин</th> | 84 | <th class="px-4 py-3">Email/логин</th> |
85 | <th class="px-4 py-3">Просмотр резюме</th> | 85 | <th class="px-4 py-3">Просмотр резюме</th> |
86 | <th class="px-4 py-3">Отправка сообщений</th> | 86 | <th class="px-4 py-3">Отправка сообщений</th> |
87 | <th class="px-4 py-3">Публикация вакансий</th> | 87 | <th class="px-4 py-3">Публикация вакансий</th> |
88 | <th class="px-4 py-3">Админ</th> | 88 | <th class="px-4 py-3">Админ</th> |
89 | <!--<th class="px-4 py-3">Дата регистрации</th>--> | 89 | <!--<th class="px-4 py-3">Дата регистрации</th>--> |
90 | </tr> | 90 | </tr> |
91 | </thead> | 91 | </thead> |
92 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 92 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
93 | @foreach($users as $user) | 93 | @foreach($users as $user) |
94 | <tr class="text-gray-700 dark:text-gray-400"> | 94 | <tr class="text-gray-700 dark:text-gray-400"> |
95 | <td class="px-4 py-3"> | 95 | <td class="px-4 py-3"> |
96 | {{$user->id}} | 96 | {{$user->id}} |
97 | </td> | 97 | </td> |
98 | <td class="px-4 py-3"> | 98 | <td class="px-4 py-3"> |
99 | {{ $user->name }} | 99 | {{ $user->name }} |
100 | </td> | 100 | </td> |
101 | <td class="px-4 py-3 text-sm"> | 101 | <td class="px-4 py-3 text-sm"> |
102 | {{ $user->email }} | 102 | {{ $user->email }} |
103 | </td> | 103 | </td> |
104 | <td class="px-4 py-3 text-sm"> | 104 | <td class="px-4 py-3 text-sm"> |
105 | <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="is_lookin" name="lookin_{{$user->id}}" {{ ($user->is_lookin) ? "checked" : "" }}/> | 105 | <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="is_lookin" name="lookin_{{$user->id}}" {{ ($user->is_lookin) ? "checked" : "" }}/> |
106 | </td> | 106 | </td> |
107 | 107 | ||
108 | <td class="px-4 py-3 text-sm"> | 108 | <td class="px-4 py-3 text-sm"> |
109 | <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="is_message" name="message_{{$user->id}}" {{ ($user->is_message) ? "checked" : "" }}/> | 109 | <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="is_message" name="message_{{$user->id}}" {{ ($user->is_message) ? "checked" : "" }}/> |
110 | </td> | 110 | </td> |
111 | 111 | ||
112 | <td class="px-4 py-3 text-sm"> | 112 | <td class="px-4 py-3 text-sm"> |
113 | <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="is_public" name="public_{{$user->id}}" {{ ($user->is_public) ? "checked" : "" }}/> | 113 | <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="is_public" name="public_{{$user->id}}" {{ ($user->is_public) ? "checked" : "" }}/> |
114 | </td> | 114 | </td> |
115 | 115 | ||
116 | <td class="px-4 py-3 text-sm"> | 116 | <td class="px-4 py-3 text-sm"> |
117 | @if ($user->id > 1) | 117 | @if ($user->id > 1) |
118 | <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="admin" name="admin_{{$user->id}}" {{ ($user->admin) ? "checked" : "" }}/> | 118 | <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="admin" name="admin_{{$user->id}}" {{ ($user->admin) ? "checked" : "" }}/> |
119 | @endif | 119 | @endif |
120 | </td> | 120 | </td> |
121 | 121 | ||
122 | <!--<td class="px-4 py-3 text-sm"> | 122 | <!--<td class="px-4 py-3 text-sm"> |
123 | {{ $user->created_at }} | 123 | {{ $user->created_at }} |
124 | </td>--> | 124 | </td>--> |
125 | </tr> | 125 | </tr> |
126 | @endforeach | 126 | @endforeach |
127 | </tbody> | 127 | </tbody> |
128 | </table> | 128 | </table> |
129 | </div> | 129 | </div> |
130 | 130 | ||
131 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | 131 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> |
132 | <?//=$users->appends($_GET)->links('admin.pagginate'); ?> | 132 | <?//=$users->appends($_GET)->links('admin.pagginate'); ?> |
133 | <?=$users->links('admin.pagginate'); ?> | 133 | <?=$users->links('admin.pagginate'); ?> |
134 | </div> | 134 | </div> |
135 | 135 | ||
136 | 136 | ||
137 | <!--<div | 137 | <!--<div |
138 | class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800" | 138 | class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800" |
139 | > | 139 | > |
140 | <span class="flex items-center col-span-3"> | 140 | <span class="flex items-center col-span-3"> |
141 | Showing 21-30 of 100 | 141 | Showing 21-30 of 100 |
142 | </span> | 142 | </span> |
143 | <span class="col-span-2"></span> | 143 | <span class="col-span-2"></span> |
144 | 144 | ||
145 | <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> | 145 | <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> |
146 | <nav aria-label="Table navigation"> | 146 | <nav aria-label="Table navigation"> |
147 | <ul class="inline-flex items-center"> | 147 | <ul class="inline-flex items-center"> |
148 | <li> | 148 | <li> |
149 | <button | 149 | <button |
150 | class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" | 150 | class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" |
151 | aria-label="Previous" | 151 | aria-label="Previous" |
152 | > | 152 | > |
153 | <svg | 153 | <svg |
154 | aria-hidden="true" | 154 | aria-hidden="true" |
155 | class="w-4 h-4 fill-current" | 155 | class="w-4 h-4 fill-current" |
156 | viewBox="0 0 20 20" | 156 | viewBox="0 0 20 20" |
157 | > | 157 | > |
158 | <path | 158 | <path |
159 | d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" | 159 | d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" |
160 | clip-rule="evenodd" | 160 | clip-rule="evenodd" |
161 | fill-rule="evenodd" | 161 | fill-rule="evenodd" |
162 | ></path> | 162 | ></path> |
163 | </svg> | 163 | </svg> |
164 | </button> | 164 | </button> |
165 | </li> | 165 | </li> |
166 | <li> | 166 | <li> |
167 | <button | 167 | <button |
168 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 168 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
169 | > | 169 | > |
170 | 1 | 170 | 1 |
171 | </button> | 171 | </button> |
172 | </li> | 172 | </li> |
173 | <li> | 173 | <li> |
174 | <button | 174 | <button |
175 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 175 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
176 | > | 176 | > |
177 | 2 | 177 | 2 |
178 | </button> | 178 | </button> |
179 | </li> | 179 | </li> |
180 | <li> | 180 | <li> |
181 | <button | 181 | <button |
182 | class="px-3 py-1 text-white transition-colors duration-150 bg-purple-600 border border-r-0 border-purple-600 rounded-md focus:outline-none focus:shadow-outline-purple" | 182 | class="px-3 py-1 text-white transition-colors duration-150 bg-purple-600 border border-r-0 border-purple-600 rounded-md focus:outline-none focus:shadow-outline-purple" |
183 | > | 183 | > |
184 | 3 | 184 | 3 |
185 | </button> | 185 | </button> |
186 | </li> | 186 | </li> |
187 | <li> | 187 | <li> |
188 | <button | 188 | <button |
189 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 189 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
190 | > | 190 | > |
191 | 4 | 191 | 4 |
192 | </button> | 192 | </button> |
193 | </li> | 193 | </li> |
194 | <li> | 194 | <li> |
195 | <span class="px-3 py-1">...</span> | 195 | <span class="px-3 py-1">...</span> |
196 | </li> | 196 | </li> |
197 | <li> | 197 | <li> |
198 | <button | 198 | <button |
199 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 199 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
200 | > | 200 | > |
201 | 8 | 201 | 8 |
202 | </button> | 202 | </button> |
203 | </li> | 203 | </li> |
204 | <li> | 204 | <li> |
205 | <button | 205 | <button |
206 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 206 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
207 | > | 207 | > |
208 | 9 | 208 | 9 |
209 | </button> | 209 | </button> |
210 | </li> | 210 | </li> |
211 | <li> | 211 | <li> |
212 | <button | 212 | <button |
213 | class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" | 213 | class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" |
214 | aria-label="Next" | 214 | aria-label="Next" |
215 | > | 215 | > |
216 | <svg | 216 | <svg |
217 | class="w-4 h-4 fill-current" | 217 | class="w-4 h-4 fill-current" |
218 | aria-hidden="true" | 218 | aria-hidden="true" |
219 | viewBox="0 0 20 20" | 219 | viewBox="0 0 20 20" |
220 | > | 220 | > |
221 | <path | 221 | <path |
222 | d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" | 222 | d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" |
223 | clip-rule="evenodd" | 223 | clip-rule="evenodd" |
224 | fill-rule="evenodd" | 224 | fill-rule="evenodd" |
225 | ></path> | 225 | ></path> |
226 | </svg> | 226 | </svg> |
227 | </button> | 227 | </button> |
228 | </li> | 228 | </li> |
229 | </ul> | 229 | </ul> |
230 | </nav> | 230 | </nav> |
231 | </span> | 231 | </span> |
232 | </div>--> | 232 | </div>--> |
233 | </div> | 233 | </div> |
234 | 234 | ||
235 | <?//=$users->appends($_GET)->links('catalogs.paginate'); ?> | 235 | <?//=$users->appends($_GET)->links('catalogs.paginate'); ?> |
236 | 236 | ||
237 | 237 | ||
238 | @endsection | 238 | @endsection |
239 | 239 |
routes/web.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | use App\Http\Controllers\Admin\AdminController; | 3 | use App\Http\Controllers\Admin\AdminController; |
4 | use App\Http\Controllers\Admin\CategoryController; | 4 | use App\Http\Controllers\Admin\CategoryController; |
5 | use App\Http\Controllers\Admin\EmployersController; | 5 | use App\Http\Controllers\Admin\EmployersController; |
6 | use App\Http\Controllers\Admin\InfoBloksController; | 6 | use App\Http\Controllers\Admin\InfoBloksController; |
7 | use App\Http\Controllers\Admin\JobTitlesController; | 7 | use App\Http\Controllers\Admin\JobTitlesController; |
8 | use App\Http\Controllers\Admin\UsersController; | 8 | use App\Http\Controllers\Admin\UsersController; |
9 | use App\Http\Controllers\Admin\WorkersController; | 9 | use App\Http\Controllers\Admin\WorkersController; |
10 | use App\Http\Controllers\Auth\LoginController; | 10 | use App\Http\Controllers\Auth\LoginController; |
11 | use App\Http\Controllers\Auth\RegisterController; | 11 | use App\Http\Controllers\Auth\RegisterController; |
12 | use App\Models\User; | 12 | use App\Models\User; |
13 | use App\Http\Controllers\MainController; | 13 | use App\Http\Controllers\MainController; |
14 | use App\Http\Controllers\HomeController; | 14 | use App\Http\Controllers\HomeController; |
15 | use Illuminate\Support\Facades\Route; | 15 | use Illuminate\Support\Facades\Route; |
16 | use App\Http\Controllers\Admin\CompanyController; | 16 | use App\Http\Controllers\Admin\CompanyController; |
17 | use App\Http\Controllers\Admin\Ad_EmployersController; | 17 | use App\Http\Controllers\Admin\Ad_EmployersController; |
18 | use App\Http\Controllers\Admin\MsgAnswersController; | 18 | use App\Http\Controllers\Admin\MsgAnswersController; |
19 | use App\Http\Controllers\Admin\GroupsController; | 19 | use App\Http\Controllers\Admin\GroupsController; |
20 | 20 | ||
21 | 21 | ||
22 | /* | 22 | /* |
23 | |-------------------------------------------------------------------------- | 23 | |-------------------------------------------------------------------------- |
24 | | Web Routes | 24 | | Web Routes |
25 | |-------------------------------------------------------------------------- | 25 | |-------------------------------------------------------------------------- |
26 | | | 26 | | |
27 | | Here is where you can register web routes for your application. These | 27 | | Here is where you can register web routes for your application. These |
28 | | routes are loaded by the RouteServiceProvider within a group which | 28 | | routes are loaded by the RouteServiceProvider within a group which |
29 | | contains the "web" middleware group. Now create something great! | 29 | | contains the "web" middleware group. Now create something great! |
30 | | | 30 | | |
31 | */ | 31 | */ |
32 | /* | 32 | /* |
33 | Route::get('/', function () { | 33 | Route::get('/', function () { |
34 | return view('welcome'); | 34 | return view('welcome'); |
35 | })->name('index'); | 35 | })->name('index'); |
36 | */ | 36 | */ |
37 | Route::get('/', [MainController::class, 'index'])->name('index'); | 37 | Route::get('/', [MainController::class, 'index'])->name('index'); |
38 | 38 | ||
39 | //Роуты авторизации, регистрации, восстановления, аутентификации | 39 | //Роуты авторизации, регистрации, восстановления, аутентификации |
40 | Auth::routes(['verify' => true]); | 40 | Auth::routes(['verify' => true]); |
41 | //Личный кабинет пользователя | 41 | //Личный кабинет пользователя |
42 | Route::get('/home', [HomeController::class, 'index'])->name('home'); | 42 | Route::get('/home', [HomeController::class, 'index'])->name('home'); |
43 | 43 | ||
44 | /* | 44 | /* |
45 | Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { | 45 | Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { |
46 | $user = User::where('email',$request->input('email'))->first(); | 46 | $user = User::where('email',$request->input('email'))->first(); |
47 | 47 | ||
48 | $user->sendEmailVerificationNotification(); | 48 | $user->sendEmailVerificationNotification(); |
49 | 49 | ||
50 | return 'your response'; | 50 | return 'your response'; |
51 | })->middleware('throttle:6,1')->name('verification.resend'); | 51 | })->middleware('throttle:6,1')->name('verification.resend'); |
52 | */ | 52 | */ |
53 | 53 | ||
54 | // Авторизация, регистрация в админку | 54 | // Авторизация, регистрация в админку |
55 | Route::group([ | 55 | Route::group([ |
56 | 'as' => 'admin.', // имя маршрута, например auth.index | 56 | 'as' => 'admin.', // имя маршрута, например auth.index |
57 | 'prefix' => 'admin', // префикс маршрута, например auth/index | 57 | 'prefix' => 'admin', // префикс маршрута, например auth/index |
58 | 'middleware' => ['guest'], | 58 | 'middleware' => ['guest'], |
59 | ], function () { | 59 | ], function () { |
60 | // Форма регистрации | 60 | // Форма регистрации |
61 | Route::get('register', [AdminController::class, 'register'])->name('register'); | 61 | Route::get('register', [AdminController::class, 'register'])->name('register'); |
62 | 62 | ||
63 | // Создание пользователя | 63 | // Создание пользователя |
64 | Route::post('register', [AdminController::class, 'create'])->name('create'); | 64 | Route::post('register', [AdminController::class, 'create'])->name('create'); |
65 | //Форма входа | 65 | //Форма входа |
66 | Route::get('login', [AdminController::class, 'login'])->name('login'); | 66 | Route::get('login', [AdminController::class, 'login'])->name('login'); |
67 | 67 | ||
68 | // аутентификация | 68 | // аутентификация |
69 | Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); | 69 | Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); |
70 | 70 | ||
71 | }); | 71 | }); |
72 | 72 | ||
73 | // Личный кабинет админки | 73 | // Личный кабинет админки |
74 | Route::group([ | 74 | Route::group([ |
75 | 'as' => 'admin.', // имя маршрута, например auth.index | 75 | 'as' => 'admin.', // имя маршрута, например auth.index |
76 | 'prefix' => 'admin', // префикс маршрута, например auth/index | 76 | 'prefix' => 'admin', // префикс маршрута, например auth/index |
77 | 'middleware' => ['auth'], ['admin'], | 77 | 'middleware' => ['auth'], ['admin'], |
78 | ], function() { | 78 | ], function() { |
79 | 79 | ||
80 | // выход | 80 | // выход |
81 | Route::get('logout', [AdminController::class, 'logout'])->name('logout'); | 81 | Route::get('logout', [AdminController::class, 'logout'])->name('logout'); |
82 | 82 | ||
83 | // кабинет главная страница | 83 | // кабинет главная страница |
84 | Route::get('cabinet', [AdminController::class, 'index'])->name('index'); | 84 | Route::get('cabinet', [AdminController::class, 'index'])->name('index'); |
85 | 85 | ||
86 | // кабинет профиль админа - форма | 86 | // кабинет профиль админа - форма |
87 | Route::get('profile', [AdminController::class, 'profile'])->name('profile'); | 87 | Route::get('profile', [AdminController::class, 'profile'])->name('profile'); |
88 | // кабинет профиль админа - сохранение формы | 88 | // кабинет профиль админа - сохранение формы |
89 | Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); | 89 | Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); |
90 | 90 | ||
91 | // кабинет профиль - форма пароли | 91 | // кабинет профиль - форма пароли |
92 | Route::get('password', [AdminController::class, 'profile_password'])->name('password'); | 92 | Route::get('password', [AdminController::class, 'profile_password'])->name('password'); |
93 | // кабинет профиль - сохранение формы пароля | 93 | // кабинет профиль - сохранение формы пароля |
94 | Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); | 94 | Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); |
95 | 95 | ||
96 | 96 | ||
97 | // кабинет профиль пользователя - форма | 97 | // кабинет профиль пользователя - форма |
98 | Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); | 98 | Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); |
99 | // кабинет профиль пользователя - сохранение формы | 99 | // кабинет профиль пользователя - сохранение формы |
100 | Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); | 100 | Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); |
101 | 101 | ||
102 | // кабинет профиль работодатель - форма | 102 | // кабинет профиль работодатель - форма |
103 | Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); | 103 | Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); |
104 | // кабинет профиль работодатель - сохранение формы | 104 | // кабинет профиль работодатель - сохранение формы |
105 | Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); | 105 | Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); |
106 | 106 | ||
107 | // кабинет профиль работник - форма | 107 | // кабинет профиль работник - форма |
108 | Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile'); | 108 | Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile'); |
109 | 109 | ||
110 | // кабинет настройки сайта - форма | 110 | // кабинет настройки сайта - форма |
111 | Route::get('config', [AdminController::class, 'config_form'])->name('config'); | 111 | Route::get('config', [AdminController::class, 'config_form'])->name('config'); |
112 | // кабинет настройки сайта сохранение формы | 112 | // кабинет настройки сайта сохранение формы |
113 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); | 113 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); |
114 | 114 | ||
115 | // кабинет - пользователи | 115 | // кабинет - пользователи |
116 | Route::get('users', [UsersController::class, 'index'])->name('users'); | 116 | Route::get('users', [UsersController::class, 'index'])->name('users'); |
117 | 117 | ||
118 | // кабинет - пользователи | 118 | // кабинет - пользователи |
119 | Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); | 119 | Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); |
120 | 120 | ||
121 | // кабинет - работодатели | 121 | // кабинет - работодатели |
122 | Route::get('employers', [EmployersController::class, 'index'])->name('employers'); | 122 | Route::get('employers', [EmployersController::class, 'index'])->name('employers'); |
123 | 123 | ||
124 | // кабинет - соискатели | 124 | // кабинет - соискатели |
125 | Route::get('workers', [WorkersController::class, 'index'])->name('workers'); | 125 | Route::get('workers', [WorkersController::class, 'index'])->name('workers'); |
126 | 126 | ||
127 | // кабинет - вакансии | 127 | // кабинет - вакансии |
128 | Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); | 128 | Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); |
129 | 129 | ||
130 | // кабинет - категории | 130 | // кабинет - категории |
131 | //Route::get('categories', [AdminController::class, 'index'])->name('categories'); | 131 | //Route::get('categories', [AdminController::class, 'index'])->name('categories'); |
132 | /* | 132 | /* |
133 | * CRUD-операции над Справочником Категории | 133 | * CRUD-операции над Справочником Категории |
134 | */ | 134 | */ |
135 | Route::resource('categories', CategoryController::class, ['except' => ['show']]); | 135 | Route::resource('categories', CategoryController::class, ['except' => ['show']]); |
136 | 136 | ||
137 | 137 | ||
138 | //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); | 138 | //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); |
139 | /* | 139 | /* |
140 | * кабинет - CRUD-операции по справочнику должности | 140 | * кабинет - CRUD-операции по справочнику должности |
141 | * | 141 | * |
142 | */ | 142 | */ |
143 | Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); | 143 | Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); |
144 | 144 | ||
145 | // кабинет - сообщения | 145 | // кабинет - сообщения |
146 | Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); | 146 | Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); |
147 | 147 | ||
148 | /* | 148 | /* |
149 | * Расписанный подход в описании каждой директорий групп пользователей. | 149 | * Расписанный подход в описании каждой директорий групп пользователей. |
150 | */ | 150 | */ |
151 | // кабинет - группы пользователей | 151 | // кабинет - группы пользователей |
152 | Route::get('groups', [GroupsController::class, 'index'])->name('groups'); | 152 | Route::get('groups', [GroupsController::class, 'index'])->name('groups'); |
153 | // кабинет - добавление форма группы пользователей | 153 | // кабинет - добавление форма группы пользователей |
154 | Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); | 154 | Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); |
155 | // кабинет - сохранение формы группы пользователей | 155 | // кабинет - сохранение формы группы пользователей |
156 | Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); | 156 | Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); |
157 | // кабинет - редактирование форма группы пользователей | 157 | // кабинет - редактирование форма группы пользователей |
158 | Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); | 158 | Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); |
159 | // кабинет - сохранение редактированной формы группы пользователей | 159 | // кабинет - сохранение редактированной формы группы пользователей |
160 | Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); | 160 | Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); |
161 | // кабинет - удаление группы пользователей | 161 | // кабинет - удаление группы пользователей |
162 | Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); | 162 | Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); |
163 | 163 | ||
164 | // кабинет - список админов | 164 | // кабинет - список админов |
165 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); | 165 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); |
166 | 166 | ||
167 | /////редактор////// кабинет - редактор сайта//////////////////////// | 167 | /////редактор////// кабинет - редактор сайта//////////////////////// |
168 | Route::get('editor-site', function() { | 168 | Route::get('editor-site', function() { |
169 | return view('admin.editor.index'); | 169 | return view('admin.editor.index'); |
170 | })->name('editor-site'); | 170 | })->name('editor-site'); |
171 | 171 | ||
172 | // кабинет - редактор шапки-футера сайта | 172 | // кабинет - редактор шапки-футера сайта |
173 | Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); | 173 | Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); |
174 | 174 | ||
175 | // кабинет - редактор должности на главной | 175 | // кабинет - редактор должности на главной |
176 | Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); | 176 | Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); |
177 | 177 | ||
178 | // кабинет - редактор работодатели на главной | 178 | // кабинет - редактор работодатели на главной |
179 | Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); | 179 | Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); |
180 | 180 | ||
181 | // кабинет - редактор seo-сайта | 181 | // кабинет - редактор seo-сайта |
182 | Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); | 182 | Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); |
183 | 183 | ||
184 | |||
184 | // кабинет - редактор страниц | 185 | // кабинет - редактор страниц |
185 | Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); | 186 | Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); |
187 | // кабинет - добавление страницы | ||
188 | Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); | ||
189 | // кабинет - сохранение формы страницы | ||
190 | Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); | ||
191 | // кабинет - редактирование форма страницы | ||
192 | Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); | ||
193 | // кабинет - сохранение редактированной формы страницы | ||
194 | Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); | ||
195 | // кабинет - удаление страницы | ||
196 | Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); | ||
197 | |||
186 | 198 | ||
187 | // кабинет - реклама сайта | 199 | // кабинет - реклама сайта |
188 | Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); | 200 | Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); |
189 | //////////////////////////////////////////////////////////////////////// | 201 | //////////////////////////////////////////////////////////////////////// |
190 | 202 | ||
191 | // кабинет - отзывы о работодателе для модерации | 203 | // кабинет - отзывы о работодателе для модерации |
192 | Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); | 204 | Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); |
193 | 205 | ||
194 | // Общая страница статистики | 206 | // Общая страница статистики |
195 | Route::get('statics', function () { | 207 | Route::get('statics', function () { |
196 | return view('admin.static.index'); | 208 | return view('admin.static.index'); |
197 | })->name('statics'); | 209 | })->name('statics'); |
198 | 210 | ||
199 | // кабинет - статистика работников | 211 | // кабинет - статистика работников |
200 | Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); | 212 | Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); |
201 | 213 | ||
202 | // кабинет - статистика вакансий работодателя | 214 | // кабинет - статистика вакансий работодателя |
203 | Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); | 215 | Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); |
204 | 216 | ||
205 | // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника | 217 | // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника |
206 | /* | 218 | /* |
207 | * CRUD-операции над справочником дипломы и документы | 219 | * CRUD-операции над справочником дипломы и документы |
208 | */ | 220 | */ |
209 | //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); | 221 | //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); |
210 | Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); | 222 | Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); |
211 | 223 | ||
212 | // кабинет - роли пользователя | 224 | // кабинет - роли пользователя |
213 | Route::get('roles', [UsersController::class, 'roles'])->name('roles'); | 225 | Route::get('roles', [UsersController::class, 'roles'])->name('roles'); |
214 | 226 | ||
215 | }); | 227 | }); |
216 | 228 |