Commit 96681864eeb520fc2c9adf4507da38610e460119

Authored by Андрей Ларионов
1 parent 180e53f582

Справочник образование и программы образования

Showing 9 changed files with 176 additions and 6 deletions Inline Diff

app/Http/Controllers/Admin/EducationController.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\Http\Requests\EducationRequest; 6 use App\Http\Requests\EducationRequest;
7 use App\Http\Requests\ProgramEducationRequest;
7 use App\Models\Education; 8 use App\Models\Education;
9 use App\Models\ProgramEducation;
8 use Illuminate\Http\Request; 10 use Illuminate\Http\Request;
9 use Illuminate\Support\Facades\Storage; 11 use Illuminate\Support\Facades\Storage;
10 12
11 class EducationController extends Controller 13 class EducationController extends Controller
12 { 14 {
13 /** 15 /**
14 * Display a listing of the resource. 16 * Display a listing of the resource.
15 * 17 *
16 * @return \Illuminate\Http\Response 18 * @return \Illuminate\Http\Response
17 */ 19 */
18 public function index() 20 public function index()
19 { 21 {
20 $education = Education::query()->active()->paginate(15); 22 $education = Education::query()->active()->paginate(15);
21 return view('admin.education.index', compact('education')); 23 return view('admin.education.index', compact('education'));
22 } 24 }
23 25
24 /** 26 /**
25 * Show the form for creating a new resource. 27 * Show the form for creating a new resource.
26 * 28 *
27 * @return \Illuminate\Http\Response 29 * @return \Illuminate\Http\Response
28 */ 30 */
29 public function create() 31 public function create()
30 { 32 {
31 return view('admin.education.add'); 33 return view('admin.education.add');
32 } 34 }
33 35
34 /** 36 /**
35 * Store a newly created resource in storage. 37 * Store a newly created resource in storage.
36 * 38 *
37 * @param \Illuminate\Http\Request $request 39 * @param \Illuminate\Http\Request $request
38 * @return \Illuminate\Http\Response 40 * @return \Illuminate\Http\Response
39 */ 41 */
40 public function store(EducationRequest $request) 42 public function store(EducationRequest $request)
41 { 43 {
42 $params = $request->all(); 44 $params = $request->all();
43 if ($request->has('image')) { 45 if ($request->has('image')) {
44 $params['image'] = $request->file('image')->store("education", 'public'); 46 $params['image'] = $request->file('image')->store("education", 'public');
45 } 47 }
46 Education::create($params); 48 Education::create($params);
47 49
48 50
49 return redirect()->route('admin.education.index'); 51 return redirect()->route('admin.education.index');
50 } 52 }
51 53
52 /** 54 /**
53 * Display the specified resource. 55 * Display the specified resource.
54 * 56 *
55 * @param \App\Models\Education $education 57 * @param \App\Models\Education $education
56 * @return \Illuminate\Http\Response 58 * @return \Illuminate\Http\Response
57 */ 59 */
58 public function show(Education $education) 60 public function show(Education $education)
59 { 61 {
60 // 62 //
61 } 63 }
62 64
63 /** 65 /**
64 * Show the form for editing the specified resource. 66 * Show the form for editing the specified resource.
65 * 67 *
66 * @param \App\Models\Education $education 68 * @param \App\Models\Education $education
67 * @return \Illuminate\Http\Response 69 * @return \Illuminate\Http\Response
68 */ 70 */
69 public function edit(Education $education) 71 public function edit(Education $education)
70 { 72 {
73 $program1 = ProgramEducation::query()->where('education_id', '=', $education->id)
74 ->where('level', '=', '1')->get();
75 $program2 = ProgramEducation::query()->where('education_id', '=', $education->id)
76 ->where('level', '=', '2')->get();
77 $program3 = ProgramEducation::query()->where('education_id', '=', $education->id)
78 ->where('level', '=', '3')->get();
71 79
72 return view('admin.education.edit', compact('education')); 80 return view('admin.education.edit', compact('education', 'program1', 'program2', 'program3'));
73 } 81 }
74 82
75 /** 83 /**
76 * Update the specified resource in storage. 84 * Update the specified resource in storage.
77 * 85 *
78 * @param \Illuminate\Http\Request $request 86 * @param \Illuminate\Http\Request $request
79 * @param \App\Models\Education $education 87 * @param \App\Models\Education $education
80 * @return \Illuminate\Http\Response 88 * @return \Illuminate\Http\Response
81 */ 89 */
82 public function update(EducationRequest $request, Education $education) 90 public function update(EducationRequest $request, Education $education)
83 { 91 {
84 $params = $request->all(); 92 $params = $request->all();
85 if ($request->has('image')) { 93 if ($request->has('image')) {
86 if (!empty($education->image)) { 94 if (!empty($education->image)) {
87 Storage::delete($education->image); 95 Storage::delete($education->image);
88 } 96 }
89 $params['image'] = $request->file('image')->store("education", 'public'); 97 $params['image'] = $request->file('image')->store("education", 'public');
90 } 98 }
91 99
92 $education->update($params); 100 $education->update($params);
93 return redirect()->route('admin.education.index'); 101 return redirect()->route('admin.education.index');
94 } 102 }
95 103
96 /** 104 /**
97 * Remove the specified resource from storage. 105 * Remove the specified resource from storage.
98 * 106 *
99 * @param \App\Models\Education $education 107 * @param \App\Models\Education $education
100 * @return \Illuminate\Http\Response 108 * @return \Illuminate\Http\Response
101 */ 109 */
102 public function destroy(Education $education) 110 public function destroy(Education $education)
103 { 111 {
104 $education->update(['is_remove' => 1]); 112 $education->update(['is_remove' => 1]);
105 return redirect()->route('admin.education.index'); 113 return redirect()->route('admin.education.index');
106 } 114 }
115
116 public function add_program(Education $education, int $level) {
117 $id_education = $education->id;
118 return view('admin.education.program', compact('id_education', 'level'));
119 }
120
121 public function store_program(ProgramEducationRequest $request) {
122 $education = $request->education_id;
123 ProgramEducation::create($request->all());
124
125 return redirect()->route('admin.education.edit', ['education' => $education]);
126 }
127
107 } 128 }
108 129
app/Http/Requests/JobTitlesRequest.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Requests; 3 namespace App\Http\Requests;
4 4
5 use Illuminate\Foundation\Http\FormRequest; 5 use Illuminate\Foundation\Http\FormRequest;
6 6
7 class JobTitlesRequest extends FormRequest 7 class JobTitlesRequest extends FormRequest
8 { 8 {
9 /** 9 /**
10 * Determine if the user is authorized to make this request. 10 * Determine if the user is authorized to make this request.
11 * 11 *
12 * @return bool 12 * @return bool
13 */ 13 */
14 public function authorize() 14 public function authorize()
15 { 15 {
16 return true; 16 return true;
17 } 17 }
18 18
19 /** 19 /**
20 * Get the validation rules that apply to the request. 20 * Get the validation rules that apply to the request.
21 * 21 *
22 * @return array<string, mixed> 22 * @return array<string, mixed>
23 */ 23 */
24 public function rules() 24 public function rules()
25 { 25 {
26 return [ 26 return [
27 'name' => [ 27 'name' => [
28 'required', 28 'required',
29 'min:3', 29 'min:3',
30 'max:100', 30 'max:255',
31 ], 31 ],
32 'parent_id' => [ 32 'parent_id' => [
33 'numeric', 33 'numeric',
34 'min:0', 34 'min:0',
35 'max:9999999', 35 'max:9999999',
36 ], 36 ],
37 ]; 37 ];
38 } 38 }
39 39
40 public function messages() { 40 public function messages() {
41 return [ 41 return [
42 'required' => 'Поле «:attribute» обязательно для заполнения', 42 'required' => 'Поле «:attribute» обязательно для заполнения',
43 'unique' => 'Такое значение поля «:attribute» уже используется', 43 'unique' => 'Такое значение поля «:attribute» уже используется',
44 'min' => [ 44 'min' => [
45 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 45 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
46 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 46 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
47 ], 47 ],
48 'max' => [ 48 'max' => [
49 'string' => 'Поле «:attribute» должно быть не больше :max символов', 49 'string' => 'Поле «:attribute» должно быть не больше :max символов',
50 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 50 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
51 ], 51 ],
52 'mimes' => 'Файл «:attribute» должен иметь формат :values', 52 'mimes' => 'Файл «:attribute» должен иметь формат :values',
53 'numeric' => 'В поле «:attribute» должно быть указано целое число от 0 до 9999999', 53 'numeric' => 'В поле «:attribute» должно быть указано целое число от 0 до 9999999',
54 ]; 54 ];
55 55
56 } 56 }
57 } 57 }
58 58
app/Http/Requests/ProgramEducationRequest.php
File was created 1 <?php
2
3 namespace App\Http\Requests;
4
5 use Illuminate\Foundation\Http\FormRequest;
6
7 class ProgramEducationRequest 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 true;
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 'name' => [
28 'required',
29 'min:3',
30 'max:255',
31 ],
32 ];
33 }
34 }
35
app/Models/ProgramEducation.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 ProgramEducation extends Model 8 class ProgramEducation extends Model
9 { 9 {
10 use HasFactory; 10 use HasFactory;
11
12 protected $fillable = [
13 'id',
14 'name',
15 'education_id',
16 'text',
17 'email',
18 'telephone',
19 'level',
20 ];
11 } 21 }
12 22
database/migrations/2023_10_16_083120_create_program_education_table.php
1 <?php 1 <?php
2 2
3 use Illuminate\Database\Migrations\Migration; 3 use Illuminate\Database\Migrations\Migration;
4 use Illuminate\Database\Schema\Blueprint; 4 use Illuminate\Database\Schema\Blueprint;
5 use Illuminate\Support\Facades\Schema; 5 use Illuminate\Support\Facades\Schema;
6 6
7 return new class extends Migration 7 return new class extends Migration
8 { 8 {
9 /** 9 /**
10 * Run the migrations. 10 * Run the migrations.
11 * 11 *
12 * @return void 12 * @return void
13 */ 13 */
14 public function up() 14 public function up()
15 { 15 {
16 Schema::create('program_education', function (Blueprint $table) { 16 Schema::create('program_education', function (Blueprint $table) {
17 $table->id(); 17 $table->id();
18 $table->integer('education_id')->nullable(false); 18 $table->integer('education_id')->nullable(false);
19 $table->string('level')->nullable(); 19 $table->string('level')->nullable();
20 $table->string('name', 255)->nullable(false); 20 $table->string('name', 255)->nullable(false);
21 $table->text('text')->nullable(); 21 $table->text('text')->nullable();
22 $table->string('email', 255)->nullable(); 22 $table->string('email', 255)->nullable();
23 $table->string('telephone', 255); 23 $table->string('telephone', 255)->nullable();
24 $table->timestamps(); 24 $table->timestamps();
25 }); 25 });
26 } 26 }
27 27
28 /** 28 /**
29 * Reverse the migrations. 29 * Reverse the migrations.
30 * 30 *
31 * @return void 31 * @return void
32 */ 32 */
33 public function down() 33 public function down()
34 { 34 {
35 Schema::dropIfExists('program_education'); 35 Schema::dropIfExists('program_education');
36 } 36 }
37 }; 37 };
38 38
resources/views/admin/education/form.blade.php
1 @csrf 1 @csrf
2 2
3 @isset($education) 3 @isset($education)
4 @method('PUT') 4 @method('PUT')
5 @endisset 5 @endisset
6 6
7 <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> 7 <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800">
8 <label class="block text-sm"> 8 <label class="block text-sm">
9 <span class="text-gray-700 dark:text-gray-400">Название учебного заведения</span> 9 <span class="text-gray-700 dark:text-gray-400">Название учебного заведения</span>
10 <input name="name" id="name" 10 <input name="name" id="name"
11 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" 11 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"
12 placeholder="Название учебного заведения" value="{{ old('name') ?? $education->name ?? '' }}" 12 placeholder="Название учебного заведения" value="{{ old('name') ?? $education->name ?? '' }}"
13 /> 13 />
14 @error('name') 14 @error('name')
15 <span class="text-xs text-red-600 dark:text-red-400"> 15 <span class="text-xs text-red-600 dark:text-red-400">
16 {{ $message }} 16 {{ $message }}
17 </span> 17 </span>
18 @enderror 18 @enderror
19 </label><br> 19 </label><br>
20 20
21 <label class="block text-sm"> 21 <label class="block text-sm">
22 <span class="text-gray-700 dark:text-gray-400">Адрес</span> 22 <span class="text-gray-700 dark:text-gray-400">Адрес</span>
23 <input name="address" id="address" 23 <input name="address" id="address"
24 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" 24 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"
25 placeholder="Адрес" value="{{ old('address') ?? $education->address ?? '' }}" 25 placeholder="Адрес" value="{{ old('address') ?? $education->address ?? '' }}"
26 /> 26 />
27 @error('address') 27 @error('address')
28 <span class="text-xs text-red-600 dark:text-red-400"> 28 <span class="text-xs text-red-600 dark:text-red-400">
29 {{ $message }} 29 {{ $message }}
30 </span> 30 </span>
31 @enderror 31 @enderror
32 </label><br> 32 </label><br>
33 33
34 <label class="block text-sm"> 34 <label class="block text-sm">
35 <span class="text-gray-700 dark:text-gray-400">Email</span> 35 <span class="text-gray-700 dark:text-gray-400">Email</span>
36 <input name="email" id="email" 36 <input name="email" id="email"
37 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" 37 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"
38 placeholder="Email" value="{{ old('email') ?? $education->email ?? '' }}" 38 placeholder="Email" value="{{ old('email') ?? $education->email ?? '' }}"
39 /> 39 />
40 @error('email') 40 @error('email')
41 <span class="text-xs text-red-600 dark:text-red-400"> 41 <span class="text-xs text-red-600 dark:text-red-400">
42 {{ $message }} 42 {{ $message }}
43 </span> 43 </span>
44 @enderror 44 @enderror
45 </label><br> 45 </label><br>
46 46
47 <label class="block text-sm"> 47 <label class="block text-sm">
48 <span class="text-gray-700 dark:text-gray-400">Телефон</span> 48 <span class="text-gray-700 dark:text-gray-400">Телефон</span>
49 <input name="telephone" id="telephone" 49 <input name="telephone" id="telephone"
50 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" 50 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"
51 placeholder="Телефон" value="{{ old('telephone') ?? $education->telephone ?? '' }}" 51 placeholder="Телефон" value="{{ old('telephone') ?? $education->telephone ?? '' }}"
52 /> 52 />
53 @error('telephone') 53 @error('telephone')
54 <span class="text-xs text-red-600 dark:text-red-400"> 54 <span class="text-xs text-red-600 dark:text-red-400">
55 {{ $message }} 55 {{ $message }}
56 </span> 56 </span>
57 @enderror 57 @enderror
58 </label><br> 58 </label><br>
59 59
60 <label class="block text-sm"> 60 <label class="block text-sm">
61 <span class="text-gray-700 dark:text-gray-400">Текст</span> 61 <span class="text-gray-700 dark:text-gray-400">Текст</span>
62 <textarea class="form-control ckeditor" name="text" placeholder="Текст (html)" required 62 <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray ckeditor" name="text" placeholder="Текст (html)" required
63 rows="10">{{ old('text') ?? $education->text ?? '' }}</textarea> 63 rows="10">{{ old('text') ?? $education->text ?? '' }}</textarea>
64 @error('text') 64 @error('text')
65 <span class="text-xs text-red-600 dark:text-red-400"> 65 <span class="text-xs text-red-600 dark:text-red-400">
66 {{ $message }} 66 {{ $message }}
67 </span> 67 </span>
68 @enderror 68 @enderror
69 </label><br> 69 </label><br>
70 70
71 <label class="block text-sm"> 71 <label class="block text-sm">
72 <span class="text-gray-700 dark:text-gray-400">Картинка</span> 72 <span class="text-gray-700 dark:text-gray-400">Картинка</span>
73 <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 73 <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700
74 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple 74 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple
75 dark:text-gray-300 dark:focus:shadow-outline-gray form-input" 75 dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
76 id="image" name="image" accept="image/png, image/jpeg"> 76 id="image" name="image" accept="image/png, image/jpeg">
77 @error('image') 77 @error('image')
78 <span class="text-xs text-red-600 dark:text-red-400"> 78 <span class="text-xs text-red-600 dark:text-red-400">
79 {{ $message }} 79 {{ $message }}
80 </span> 80 </span>
81 @enderror 81 @enderror
82 @isset($education->image) 82 @isset($education->image)
83 <img src="{{asset(Storage::url($education->image))}}" width="100px"/> 83 <img src="{{asset(Storage::url($education->image))}}" width="100px"/>
84 @endisset 84 @endisset
85 </label><br> 85 </label><br>
86 86
87
88 @isset($education)
89 <div class="tabs">
90 <input type="radio" name="tab-btn" id="tab-btn-1" value="" checked>
91 <label for="tab-btn-1">Высшее образование</label>
92 <input type="radio" name="tab-btn" id="tab-btn-2" value="">
93 <label for="tab-btn-2">Средне-профессиональное образование</label>
94 <input type="radio" name="tab-btn" id="tab-btn-3" value="">
95 <label for="tab-btn-3">Дополнительное образование</label>
96 <div id="content-1">
97 <a id="add1" 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"
98 href="{{ route('admin.add-program-education', ['education' => $education->id, 'level' => 1]) }}"
99 >Добавить специализацию</a><br>
100 @if ((isset($program1)) && ($program1->count()))
101 @foreach ($program1 as $prog1)
102 <label class="block text-sm">
103 <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300">Специальность: {{$prog1->name}}</h4>
104 <span class="text-gray-700 dark:text-gray-400">Описание: {{$prog1->text}}</span>
105 </label><br><hr>
106 @endforeach
107 @else
108 <span class="text-gray-700 dark:text-gray-400">Нет записей</span>
109 @endif
110 </div>
111 <div id="content-2">
112 <a id="add2" 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"
113 href="{{ route('admin.add-program-education', ['education' => $education->id, 'level' => 2]) }}"
114 >Добавить специализацию</a><br>
115 @if ((isset($program2)) && ($program2->count()))
116 @foreach ($program2 as $prog2)
117 <label class="block text-sm">
118 <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300">Специальность: {{$prog2->name}}</h4>
119 <span class="text-gray-700 dark:text-gray-400">Описание: {{$prog2->text}}</span>
120 </label><br><hr>
121 @endforeach
122 @else
123 <span class="text-gray-700 dark:text-gray-400">Нет записей</span>
124 @endif
125 </div>
126 <div id="content-3">
127 <a id="add3" 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"
128 href="{{ route('admin.add-program-education', ['education' => $education->id, 'level' => 3]) }}"
129 >Добавить специализацию</a><br>
130 @if ((isset($program3)) && ($program3->count()))
131 @foreach ($program3 as $prog3)
132 <label class="block text-sm">
133 <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300">Специальность: {{$prog3->name}}</h4>
134 <span class="text-gray-700 dark:text-gray-400">Описание: {{$prog3->text}}</span>
135 </label><br><hr>
136 @endforeach
137 @else
138 <span class="text-gray-700 dark:text-gray-400">Нет записей</span>
139 @endif
140 </div>
141 </div><br>
142 @endisset
143
87 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> 144 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4">
88 <div> 145 <div>
89 <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"> 146 <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">
90 Сохранить 147 Сохранить
91 </button> 148 </button>
92 <a href="{{ route('admin.education.index') }}" 149 <a href="{{ route('admin.education.index') }}"
93 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" 150 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"
94 style="display: -webkit-inline-box; height: 30px!important;" 151 style="display: -webkit-inline-box; height: 30px!important;"
95 >Назад</a> 152 >Назад</a>
96 </div> 153 </div>
97 </div> 154 </div>
98 </div> 155 </div>
99 <script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script> 156 <script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script>
100 157
101 <!--<script src="{{ asset('./ckeditor/ckeditor.js') }}"></script>--> 158 <!--<script src="{{ asset('./ckeditor/ckeditor.js') }}"></script>-->
102 <script> 159 <script>
103 CKEDITOR.replace( 'text', { 160 CKEDITOR.replace( 'text', {
104 filebrowserUploadUrl: "{{route('ckeditor.image-upload', ['_token' => csrf_token() ])}}", 161 filebrowserUploadUrl: "{{route('ckeditor.image-upload', ['_token' => csrf_token() ])}}",
105 filebrowserImageUploadUrl: "{{ route('ckeditor.image-upload', ['_token' => csrf_token() ])}}", 162 filebrowserImageUploadUrl: "{{ route('ckeditor.image-upload', ['_token' => csrf_token() ])}}",
106 filebrowserUploadMethod: 'form' 163 filebrowserUploadMethod: 'form'
107 }); 164 });
108 </script> 165 </script>
109 166
resources/views/admin/education/program.blade.php
File was created 1 @extends('layout.admin', ['title' => 'Админка - Образование - добавление программы обучения'])
2
3 @section('content')
4 <form method="POST" action="{{ route('admin.store-program-education') }}">
5 @csrf
6
7 <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800">
8 <input type="hidden" id="education_id" name="education_id" value="{{ $id_education }}"/>
9 <input type="hidden" id="level" name="level" value="{{ $level }}"/>
10
11 <label class="block text-sm">
12 <span class="text-gray-700 dark:text-gray-400">Название специализации</span>
13 <input name="name" id="name"
14 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"
15 placeholder="Название специализации" required value="{{ old('name') ?? '' }}"
16 />
17 @error('name')
18 <span class="text-xs text-red-600 dark:text-red-400">
19 {{ $message }}
20 </span>
21 @enderror
22 </label><br>
23
24 <label class="block text-sm">
25 <span class="text-gray-700 dark:text-gray-400">Текст</span>
26 <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray ckeditor" name="text" placeholder="Текст (html)" required
27 rows="10">{{ old('text') ?? '' }}</textarea>
28 @error('text')
29 <span class="text-xs text-red-600 dark:text-red-400">
30 {{ $message }}
31 </span>
32 @enderror
33 </label><br>
34
35 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4">
36 <div>
37 <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">
38 Сохранить
39 </button>
40 </div>
41 </div>
42 </div>
43 </form>
44
45 @endsection
46
resources/views/admin/pages/form.blade.php
1 @csrf 1 @csrf
2 2
3 @isset($page) 3 @isset($page)
4 @method('PUT') 4 @method('PUT')
5 @endisset 5 @endisset
6 6
7 <script> 7 <script>
8 function translit(word){ 8 function translit(word){
9 var answer = ''; 9 var answer = '';
10 var converter = { 10 var converter = {
11 'а': 'a', 'б': 'b', 'в': 'v', 'г': 'g', 'д': 'd', 11 'а': 'a', 'б': 'b', 'в': 'v', 'г': 'g', 'д': 'd',
12 'е': 'e', 'ё': 'e', 'ж': 'zh', 'з': 'z', 'и': 'i', 12 'е': 'e', 'ё': 'e', 'ж': 'zh', 'з': 'z', 'и': 'i',
13 'й': 'y', 'к': 'k', 'л': 'l', 'м': 'm', 'н': 'n', 13 'й': 'y', 'к': 'k', 'л': 'l', 'м': 'm', 'н': 'n',
14 'о': 'o', 'п': 'p', 'р': 'r', 'с': 's', 'т': 't', 14 'о': 'o', 'п': 'p', 'р': 'r', 'с': 's', 'т': 't',
15 'у': 'u', 'ф': 'f', 'х': 'h', 'ц': 'c', 'ч': 'ch', 15 'у': 'u', 'ф': 'f', 'х': 'h', 'ц': 'c', 'ч': 'ch',
16 'ш': 'sh', 'щ': 'sch', 'ь': '', 'ы': 'y', 'ъ': '', 16 'ш': 'sh', 'щ': 'sch', 'ь': '', 'ы': 'y', 'ъ': '',
17 'э': 'e', 'ю': 'yu', 'я': 'ya', 17 'э': 'e', 'ю': 'yu', 'я': 'ya',
18 18
19 'А': 'A', 'Б': 'B', 'В': 'V', 'Г': 'G', 'Д': 'D', 19 'А': 'A', 'Б': 'B', 'В': 'V', 'Г': 'G', 'Д': 'D',
20 'Е': 'E', 'Ё': 'E', 'Ж': 'Zh', 'З': 'Z', 'И': 'I', 20 'Е': 'E', 'Ё': 'E', 'Ж': 'Zh', 'З': 'Z', 'И': 'I',
21 'Й': 'Y', 'К': 'K', 'Л': 'L', 'М': 'M', 'Н': 'N', 21 'Й': 'Y', 'К': 'K', 'Л': 'L', 'М': 'M', 'Н': 'N',
22 'О': 'O', 'П': 'P', 'Р': 'R', 'С': 'S', 'Т': 'T', 22 'О': 'O', 'П': 'P', 'Р': 'R', 'С': 'S', 'Т': 'T',
23 'У': 'U', 'Ф': 'F', 'Х': 'H', 'Ц': 'C', 'Ч': 'Ch', 23 'У': 'U', 'Ф': 'F', 'Х': 'H', 'Ц': 'C', 'Ч': 'Ch',
24 'Ш': 'Sh', 'Щ': 'Sch', 'Ь': '', 'Ы': 'Y', 'Ъ': '', 24 'Ш': 'Sh', 'Щ': 'Sch', 'Ь': '', 'Ы': 'Y', 'Ъ': '',
25 'Э': 'E', 'Ю': 'Yu', 'Я': 'Ya', ' ': '-' 25 'Э': 'E', 'Ю': 'Yu', 'Я': 'Ya', ' ': '-'
26 }; 26 };
27 27
28 for (var i = 0; i < word.length; ++i ) { 28 for (var i = 0; i < word.length; ++i ) {
29 if (converter[word[i]] == undefined){ 29 if (converter[word[i]] == undefined){
30 answer += word[i]; 30 answer += word[i];
31 } else { 31 } else {
32 answer += converter[word[i]]; 32 answer += converter[word[i]];
33 } 33 }
34 } 34 }
35 35
36 return answer; 36 return answer;
37 } 37 }
38 38
39 window.addEventListener("DOMContentLoaded", (event) => { 39 window.addEventListener("DOMContentLoaded", (event) => {
40 let title = document.querySelector('#name'); 40 let title = document.querySelector('#name');
41 let text = document.querySelector('#slug'); 41 let text = document.querySelector('#slug');
42 42
43 title.addEventListener('input', function() { 43 title.addEventListener('input', function() {
44 text.value = translit(this.value); 44 text.value = translit(this.value);
45 }); 45 });
46 }); 46 });
47 47
48 </script> 48 </script>
49 <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> 49 <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800">
50 <label class="block text-sm"> 50 <label class="block text-sm">
51 <span class="text-gray-700 dark:text-gray-400">Название страницы</span> 51 <span class="text-gray-700 dark:text-gray-400">Название страницы</span>
52 <input name="name" id="name" 52 <input name="name" id="name"
53 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" 53 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"
54 placeholder="Имя категории" value="{{ old('name') ?? $page->name ?? '' }}" 54 placeholder="Имя категории" value="{{ old('name') ?? $page->name ?? '' }}"
55 /> 55 />
56 @error('name') 56 @error('name')
57 <span class="text-xs text-red-600 dark:text-red-400"> 57 <span class="text-xs text-red-600 dark:text-red-400">
58 {{ $message }} 58 {{ $message }}
59 </span> 59 </span>
60 @enderror 60 @enderror
61 </label><br> 61 </label><br>
62 62
63 <label class="block text-sm"> 63 <label class="block text-sm">
64 <span class="text-gray-700 dark:text-gray-400">Английский псевдоним страницы</span> 64 <span class="text-gray-700 dark:text-gray-400">Английский псевдоним страницы</span>
65 <input name="slug" id="slug" 65 <input name="slug" id="slug"
66 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" 66 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"
67 placeholder="Имя категории" value="{{ old('slug') ?? $page->slug ?? '' }}" 67 placeholder="Имя категории" value="{{ old('slug') ?? $page->slug ?? '' }}"
68 /> 68 />
69 @error('slug') 69 @error('slug')
70 <span class="text-xs text-red-600 dark:text-red-400"> 70 <span class="text-xs text-red-600 dark:text-red-400">
71 {{ $message }} 71 {{ $message }}
72 </span> 72 </span>
73 @enderror 73 @enderror
74 </label><br> 74 </label><br>
75 75
76 <label class="block text-sm"> 76 <label class="block text-sm">
77 <span class="text-gray-700 dark:text-gray-400">Анонс</span> 77 <span class="text-gray-700 dark:text-gray-400">Анонс</span>
78 <textarea class="form-control ckeditor" name="anons" placeholder="Анонс (html)" required 78 <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray ckeditor" name="anons" placeholder="Анонс (html)" required
79 rows="10">{{ old('anons') ?? $page->anons ?? '' }}</textarea> 79 rows="10">{{ old('anons') ?? $page->anons ?? '' }}</textarea>
80 @error('anons') 80 @error('anons')
81 <span class="text-xs text-red-600 dark:text-red-400"> 81 <span class="text-xs text-red-600 dark:text-red-400">
82 {{ $message }} 82 {{ $message }}
83 </span> 83 </span>
84 @enderror 84 @enderror
85 </label><br> 85 </label><br>
86 86
87 <label class="block text-sm"> 87 <label class="block text-sm">
88 <span class="text-gray-700 dark:text-gray-400">Текст</span> 88 <span class="text-gray-700 dark:text-gray-400">Текст</span>
89 <textarea class="form-control ckeditor" name="text" placeholder="Текст (html)" required 89 <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray ckeditor" name="text" placeholder="Текст (html)" required
90 rows="10">{{ old('text') ?? $page->text ?? '' }}</textarea> 90 rows="10">{{ old('text') ?? $page->text ?? '' }}</textarea>
91 @error('text') 91 @error('text')
92 <span class="text-xs text-red-600 dark:text-red-400"> 92 <span class="text-xs text-red-600 dark:text-red-400">
93 {{ $message }} 93 {{ $message }}
94 </span> 94 </span>
95 @enderror 95 @enderror
96 </label><br> 96 </label><br>
97 97
98 <label class="block text-sm"> 98 <label class="block text-sm">
99 <span class="text-gray-700 dark:text-gray-400">Автор</span> 99 <span class="text-gray-700 dark:text-gray-400">Автор</span>
100 <input name="author" id="author" 100 <input name="author" id="author"
101 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" 101 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"
102 placeholder="Имя категории" value="{{ old('author') ?? $page->author ?? '' }}" 102 placeholder="Имя категории" value="{{ old('author') ?? $page->author ?? '' }}"
103 /> 103 />
104 @error('author') 104 @error('author')
105 <span class="text-xs text-red-600 dark:text-red-400"> 105 <span class="text-xs text-red-600 dark:text-red-400">
106 {{ $message }} 106 {{ $message }}
107 </span> 107 </span>
108 @enderror 108 @enderror
109 </label><br> 109 </label><br>
110 110
111 <label class="block text-sm"> 111 <label class="block text-sm">
112 <span class="text-gray-700 dark:text-gray-400">Картинка</span> 112 <span class="text-gray-700 dark:text-gray-400">Картинка</span>
113 <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 113 <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700
114 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple 114 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple
115 dark:text-gray-300 dark:focus:shadow-outline-gray form-input" 115 dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
116 id="image" name="image" accept="image/png, image/jpeg"> 116 id="image" name="image" accept="image/png, image/jpeg">
117 @error('image') 117 @error('image')
118 <span class="text-xs text-red-600 dark:text-red-400"> 118 <span class="text-xs text-red-600 dark:text-red-400">
119 {{ $message }} 119 {{ $message }}
120 </span> 120 </span>
121 @enderror 121 @enderror
122 @isset($page->image) 122 @isset($page->image)
123 <img src="{{asset(Storage::url($page->image))}}" width="100px"/> 123 <img src="{{asset(Storage::url($page->image))}}" width="100px"/>
124 @endisset 124 @endisset
125 </label><br> 125 </label><br>
126 126
127 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> 127 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4">
128 <div> 128 <div>
129 <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"> 129 <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">
130 Сохранить 130 Сохранить
131 </button> 131 </button>
132 <a href="{{ route('admin.editor-pages') }}" 132 <a href="{{ route('admin.editor-pages') }}"
133 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" 133 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"
134 style="display: -webkit-inline-box; height: 30px!important;" 134 style="display: -webkit-inline-box; height: 30px!important;"
135 >Назад</a> 135 >Назад</a>
136 </div> 136 </div>
137 </div> 137 </div>
138 </div> 138 </div>
139 <script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script> 139 <script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script>
140 <script> 140 <script>
141 CKEDITOR.replace( 'anons'); 141 CKEDITOR.replace( 'anons');
142 CKEDITOR.replace( 'text', { 142 CKEDITOR.replace( 'text', {
143 filebrowserUploadUrl: "{{route('ckeditor.image-upload', ['_token' => csrf_token() ])}}", 143 filebrowserUploadUrl: "{{route('ckeditor.image-upload', ['_token' => csrf_token() ])}}",
144 filebrowserImageUploadUrl: "{{ route('ckeditor.image-upload', ['_token' => csrf_token() ])}}", 144 filebrowserImageUploadUrl: "{{ route('ckeditor.image-upload', ['_token' => csrf_token() ])}}",
145 filebrowserUploadMethod: 'form' 145 filebrowserUploadMethod: 'form'
146 }); 146 });
147 </script> 147 </script>
148 148
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\CategoryEmpController; 5 use App\Http\Controllers\Admin\CategoryEmpController;
6 use App\Http\Controllers\Admin\EducationController; 6 use App\Http\Controllers\Admin\EducationController;
7 use App\Http\Controllers\Admin\EmployersController; 7 use App\Http\Controllers\Admin\EmployersController;
8 use App\Http\Controllers\Admin\InfoBloksController; 8 use App\Http\Controllers\Admin\InfoBloksController;
9 use App\Http\Controllers\Admin\JobTitlesController; 9 use App\Http\Controllers\Admin\JobTitlesController;
10 use App\Http\Controllers\Admin\UsersController; 10 use App\Http\Controllers\Admin\UsersController;
11 use App\Http\Controllers\Admin\WorkersController; 11 use App\Http\Controllers\Admin\WorkersController;
12 use App\Http\Controllers\Auth\ForgotPasswordController; 12 use App\Http\Controllers\Auth\ForgotPasswordController;
13 use App\Http\Controllers\Auth\LoginController; 13 use App\Http\Controllers\Auth\LoginController;
14 use App\Http\Controllers\Auth\RegisterController; 14 use App\Http\Controllers\Auth\RegisterController;
15 use App\Http\Controllers\CKEditorController; 15 use App\Http\Controllers\CKEditorController;
16 use App\Models\User; 16 use App\Models\User;
17 use App\Http\Controllers\MainController; 17 use App\Http\Controllers\MainController;
18 use App\Http\Controllers\HomeController; 18 use App\Http\Controllers\HomeController;
19 use Illuminate\Support\Facades\Route; 19 use Illuminate\Support\Facades\Route;
20 use App\Http\Controllers\Admin\CompanyController; 20 use App\Http\Controllers\Admin\CompanyController;
21 use App\Http\Controllers\Admin\Ad_EmployersController; 21 use App\Http\Controllers\Admin\Ad_EmployersController;
22 use App\Http\Controllers\Admin\MsgAnswersController; 22 use App\Http\Controllers\Admin\MsgAnswersController;
23 use App\Http\Controllers\Admin\GroupsController; 23 use App\Http\Controllers\Admin\GroupsController;
24 use App\Http\Controllers\PagesController; 24 use App\Http\Controllers\PagesController;
25 use Illuminate\Support\Facades\Storage; 25 use Illuminate\Support\Facades\Storage;
26 26
27 27
28 /* 28 /*
29 |-------------------------------------------------------------------------- 29 |--------------------------------------------------------------------------
30 | Web Routes 30 | Web Routes
31 |-------------------------------------------------------------------------- 31 |--------------------------------------------------------------------------
32 | 32 |
33 | Here is where you can register web routes for your application. These 33 | Here is where you can register web routes for your application. These
34 | routes are loaded by the RouteServiceProvider within a group which 34 | routes are loaded by the RouteServiceProvider within a group which
35 | contains the "web" middleware group. Now create something great! 35 | contains the "web" middleware group. Now create something great!
36 | 36 |
37 */ 37 */
38 /* 38 /*
39 Route::get('/', function () { 39 Route::get('/', function () {
40 return view('welcome'); 40 return view('welcome');
41 })->name('index'); 41 })->name('index');
42 */ 42 */
43 Route::get('/', [MainController::class, 'index'])->name('index'); 43 Route::get('/', [MainController::class, 'index'])->name('index');
44 44
45 //Роуты авторизации, регистрации, восстановления, аутентификации 45 //Роуты авторизации, регистрации, восстановления, аутентификации
46 Auth::routes(['verify' => true]); 46 Auth::routes(['verify' => true]);
47 47
48 // роуты регистрации, авторизации, восстановления пароля, верификации почты 48 // роуты регистрации, авторизации, восстановления пароля, верификации почты
49 /*Route::group([ 49 /*Route::group([
50 'as' => 'auth.', //имя маршрута, например auth.index 50 'as' => 'auth.', //имя маршрута, например auth.index
51 'prefix' => 'auth', // префикс маршрута, например, auth/index 51 'prefix' => 'auth', // префикс маршрута, например, auth/index
52 ], function () { 52 ], function () {
53 //форма регистрации 53 //форма регистрации
54 Route::get('register', [RegisterController::class, 'register'])->name('register'); 54 Route::get('register', [RegisterController::class, 'register'])->name('register');
55 55
56 //создание пользователя 56 //создание пользователя
57 Route::post('register', [RegisterController::class, 'create'])->name('create'); 57 Route::post('register', [RegisterController::class, 'create'])->name('create');
58 58
59 //форма входа авторизации 59 //форма входа авторизации
60 Route::get('login', [LoginController::class, 'login'])->name('login'); 60 Route::get('login', [LoginController::class, 'login'])->name('login');
61 61
62 //аутентификация 62 //аутентификация
63 Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); 63 Route::post('login', [LoginController::class, 'authenticate'])->name('auth');
64 64
65 //выход 65 //выход
66 Route::get('logout', [LoginController::class, 'logout'])->name('logout'); 66 Route::get('logout', [LoginController::class, 'logout'])->name('logout');
67 67
68 //форма ввода адреса почты 68 //форма ввода адреса почты
69 Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); 69 Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form');
70 70
71 //письмо на почту 71 //письмо на почту
72 Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); 72 Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail');
73 73
74 //форма восстановления пароля 74 //форма восстановления пароля
75 Route::get('reset-password/token/{token}/email/{email}', 75 Route::get('reset-password/token/{token}/email/{email}',
76 [ResetPasswordController::class, 'form'] 76 [ResetPasswordController::class, 'form']
77 )->name('reset-form'); 77 )->name('reset-form');
78 78
79 //восстановление пароля 79 //восстановление пароля
80 Route::post('reset-password', 80 Route::post('reset-password',
81 [ResetPasswordController::class, 'reset'] 81 [ResetPasswordController::class, 'reset']
82 )->name('reset-password'); 82 )->name('reset-password');
83 83
84 //сообщение о необходимости проверки адреса почты 84 //сообщение о необходимости проверки адреса почты
85 Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); 85 Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message');
86 86
87 //подтверждение адреса почты нового пользователя 87 //подтверждение адреса почты нового пользователя
88 Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) 88 Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify'])
89 ->where('token', '[a-f0-9]{32}') 89 ->where('token', '[a-f0-9]{32}')
90 ->where('id', '[0-9]+') 90 ->where('id', '[0-9]+')
91 ->name('verify-email'); 91 ->name('verify-email');
92 });*/ 92 });*/
93 93
94 //Личный кабинет пользователя 94 //Личный кабинет пользователя
95 Route::get('/home', [HomeController::class, 'index'])->name('home'); 95 Route::get('/home', [HomeController::class, 'index'])->name('home');
96 96
97 /* 97 /*
98 Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { 98 Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) {
99 $user = User::where('email',$request->input('email'))->first(); 99 $user = User::where('email',$request->input('email'))->first();
100 100
101 $user->sendEmailVerificationNotification(); 101 $user->sendEmailVerificationNotification();
102 102
103 return 'your response'; 103 return 'your response';
104 })->middleware('throttle:6,1')->name('verification.resend'); 104 })->middleware('throttle:6,1')->name('verification.resend');
105 */ 105 */
106 106
107 // Авторизация, регистрация в админку 107 // Авторизация, регистрация в админку
108 Route::group([ 108 Route::group([
109 'as' => 'admin.', // имя маршрута, например auth.index 109 'as' => 'admin.', // имя маршрута, например auth.index
110 'prefix' => 'admin', // префикс маршрута, например auth/index 110 'prefix' => 'admin', // префикс маршрута, например auth/index
111 'middleware' => ['guest'], 111 'middleware' => ['guest'],
112 ], function () { 112 ], function () {
113 // Форма регистрации 113 // Форма регистрации
114 Route::get('register', [AdminController::class, 'register'])->name('register'); 114 Route::get('register', [AdminController::class, 'register'])->name('register');
115 115
116 // Создание пользователя 116 // Создание пользователя
117 Route::post('register', [AdminController::class, 'create'])->name('create'); 117 Route::post('register', [AdminController::class, 'create'])->name('create');
118 //Форма входа 118 //Форма входа
119 Route::get('login', [AdminController::class, 'login'])->name('login'); 119 Route::get('login', [AdminController::class, 'login'])->name('login');
120 120
121 // аутентификация 121 // аутентификация
122 Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); 122 Route::post('login', [AdminController::class, 'autenticate'])->name('auth');
123 123
124 }); 124 });
125 125
126 // Личный кабинет админки 126 // Личный кабинет админки
127 Route::group([ 127 Route::group([
128 'as' => 'admin.', // имя маршрута, например auth.index 128 'as' => 'admin.', // имя маршрута, например auth.index
129 'prefix' => 'admin', // префикс маршрута, например auth/index 129 'prefix' => 'admin', // префикс маршрута, например auth/index
130 'middleware' => ['auth'], ['admin'], 130 'middleware' => ['auth'], ['admin'],
131 ], function() { 131 ], function() {
132 132
133 // выход 133 // выход
134 Route::get('logout', [AdminController::class, 'logout'])->name('logout'); 134 Route::get('logout', [AdminController::class, 'logout'])->name('logout');
135 135
136 // кабинет главная страница 136 // кабинет главная страница
137 Route::get('cabinet', [AdminController::class, 'index'])->name('index'); 137 Route::get('cabinet', [AdminController::class, 'index'])->name('index');
138 138
139 // кабинет профиль админа - форма 139 // кабинет профиль админа - форма
140 Route::get('profile', [AdminController::class, 'profile'])->name('profile'); 140 Route::get('profile', [AdminController::class, 'profile'])->name('profile');
141 // кабинет профиль админа - сохранение формы 141 // кабинет профиль админа - сохранение формы
142 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); 142 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile');
143 143
144 //кабинет сообщения админа 144 //кабинет сообщения админа
145 //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); 145 //Route::get('messages', [AdminController::class, 'profile'])->name('profile');
146 146
147 147
148 // кабинет профиль - форма пароли 148 // кабинет профиль - форма пароли
149 Route::get('password', [AdminController::class, 'profile_password'])->name('password'); 149 Route::get('password', [AdminController::class, 'profile_password'])->name('password');
150 // кабинет профиль - сохранение формы пароля 150 // кабинет профиль - сохранение формы пароля
151 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); 151 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password');
152 152
153 153
154 // кабинет профиль пользователя - форма 154 // кабинет профиль пользователя - форма
155 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); 155 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile');
156 // кабинет профиль пользователя - сохранение формы 156 // кабинет профиль пользователя - сохранение формы
157 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); 157 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile');
158 158
159 // кабинет профиль работодатель - форма 159 // кабинет профиль работодатель - форма
160 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); 160 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile');
161 // кабинет профиль работодатель - сохранение формы 161 // кабинет профиль работодатель - сохранение формы
162 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); 162 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile');
163 // кабинет удаление профиль работодателя и юзера 163 // кабинет удаление профиль работодателя и юзера
164 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); 164 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer');
165 165
166 // кабинет профиль работник - форма 166 // кабинет профиль работник - форма
167 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); 167 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add');
168 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); 168 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store');
169 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); 169 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit');
170 // кабинет профиль работник - сохранение формы 170 // кабинет профиль работник - сохранение формы
171 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); 171 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update');
172 172
173 173
174 // кабинет настройки сайта - форма 174 // кабинет настройки сайта - форма
175 Route::get('config', [AdminController::class, 'config_form'])->name('config'); 175 Route::get('config', [AdminController::class, 'config_form'])->name('config');
176 // кабинет настройки сайта сохранение формы 176 // кабинет настройки сайта сохранение формы
177 Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); 177 Route::post('config', [AdminController::class, 'store_config'])->name('store_config');
178 178
179 // кабинет - пользователи 179 // кабинет - пользователи
180 Route::get('users', [UsersController::class, 'index'])->name('users'); 180 Route::get('users', [UsersController::class, 'index'])->name('users');
181 181
182 // кабинет - пользователи 182 // кабинет - пользователи
183 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); 183 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users');
184 184
185 // кабинет - работодатели 185 // кабинет - работодатели
186 Route::get('employers', [EmployersController::class, 'index'])->name('employers'); 186 Route::get('employers', [EmployersController::class, 'index'])->name('employers');
187 187
188 // кабинет - соискатели 188 // кабинет - соискатели
189 Route::get('workers', [WorkersController::class, 'index'])->name('workers'); 189 Route::get('workers', [WorkersController::class, 'index'])->name('workers');
190 190
191 // кабинет - база данных 191 // кабинет - база данных
192 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); 192 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata');
193 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); 193 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata');
194 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); 194 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata');
195 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); 195 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata');
196 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); 196 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata');
197 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); 197 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata');
198 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); 198 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata');
199 199
200 // кабинет - вакансии 200 // кабинет - вакансии
201 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); 201 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers');
202 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); 202 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers');
203 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); 203 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers');
204 204
205 // кабинет - категории 205 // кабинет - категории
206 //Route::get('categories', [AdminController::class, 'index'])->name('categories'); 206 //Route::get('categories', [AdminController::class, 'index'])->name('categories');
207 /* 207 /*
208 * CRUD-операции над Справочником Категории 208 * CRUD-операции над Справочником Категории
209 */ 209 */
210 Route::resource('categories', CategoryController::class, ['except' => ['show']]); 210 Route::resource('categories', CategoryController::class, ['except' => ['show']]);
211 211
212 // CRUD-операции над справочником Категории для работодателей 212 // CRUD-операции над справочником Категории для работодателей
213 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); 213 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]);
214 214
215 // CRUD-операции над справочником Образование 215 // CRUD-операции над справочником Образование
216 Route::resource('education', EducationController::class, ['except' => ['show']]); 216 Route::resource('education', EducationController::class, ['except' => ['show']]);
217 217
218 Route::get('program-education/{education}/{level}', [EducationController::class, 'add_program'])->name('add-program-education');
219 Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education');
220
218 //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); 221 //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles');
219 /* 222 /*
220 * кабинет - CRUD-операции по справочнику должности 223 * кабинет - CRUD-операции по справочнику должности
221 * 224 *
222 */ 225 */
223 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); 226 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]);
224 227
225 // кабинет - сообщения (чтение чужих) 228 // кабинет - сообщения (чтение чужих)
226 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); 229 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages');
227 // кабинет - просмотр сообщения чужого (чтение) 230 // кабинет - просмотр сообщения чужого (чтение)
228 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); 231 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message');
229 232
230 // кабинет - сообщения (админские) 233 // кабинет - сообщения (админские)
231 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); 234 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages');
232 // кабинет - сообщения (админские) 235 // кабинет - сообщения (админские)
233 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); 236 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post');
234 // кабинет - sql - конструкция запросов 237 // кабинет - sql - конструкция запросов
235 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); 238 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql');
236 239
237 /* 240 /*
238 * Расписанный подход в описании каждой директорий групп пользователей. 241 * Расписанный подход в описании каждой директорий групп пользователей.
239 */ 242 */
240 // кабинет - группы пользователей 243 // кабинет - группы пользователей
241 Route::get('groups', [GroupsController::class, 'index'])->name('groups'); 244 Route::get('groups', [GroupsController::class, 'index'])->name('groups');
242 // кабинет - добавление форма группы пользователей 245 // кабинет - добавление форма группы пользователей
243 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); 246 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group');
244 // кабинет - сохранение формы группы пользователей 247 // кабинет - сохранение формы группы пользователей
245 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); 248 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store');
246 // кабинет - редактирование форма группы пользователей 249 // кабинет - редактирование форма группы пользователей
247 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); 250 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group');
248 // кабинет - сохранение редактированной формы группы пользователей 251 // кабинет - сохранение редактированной формы группы пользователей
249 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); 252 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group');
250 // кабинет - удаление группы пользователей 253 // кабинет - удаление группы пользователей
251 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); 254 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group');
252 255
253 256
254 // кабинет - список админов 257 // кабинет - список админов
255 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); 258 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin');
256 259
257 260
258 /////редактор////// кабинет - редактор сайта//////////////////////// 261 /////редактор////// кабинет - редактор сайта////////////////////////
259 Route::get('editor-site', function() { 262 Route::get('editor-site', function() {
260 return view('admin.editor.index'); 263 return view('admin.editor.index');
261 })->name('editor-site'); 264 })->name('editor-site');
262 265
263 266
264 // кабинет - редактор шапки-футера сайта 267 // кабинет - редактор шапки-футера сайта
265 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); 268 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks');
266 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); 269 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block');
267 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); 270 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store');
268 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); 271 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block');
269 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); 272 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block');
270 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); 273 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block');
271 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); 274 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block');
272 275
273 276
274 // кабинет - редактор должности на главной 277 // кабинет - редактор должности на главной
275 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); 278 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main');
276 279
277 // кабинет - редактор работодатели на главной 280 // кабинет - редактор работодатели на главной
278 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); 281 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main');
279 282
280 283
281 // кабинет - редактор seo-сайта 284 // кабинет - редактор seo-сайта
282 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); 285 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo');
283 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); 286 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo');
284 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); 287 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store');
285 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); 288 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo');
286 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); 289 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo');
287 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); 290 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo');
288 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); 291 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo');
289 292
290 293
291 // кабинет - редактор страниц 294 // кабинет - редактор страниц
292 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); 295 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages');
293 // кабинет - добавление страницы 296 // кабинет - добавление страницы
294 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); 297 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page');
295 // кабинет - сохранение формы страницы 298 // кабинет - сохранение формы страницы
296 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); 299 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store');
297 // кабинет - редактирование форма страницы 300 // кабинет - редактирование форма страницы
298 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); 301 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page');
299 // кабинет - сохранение редактированной формы страницы 302 // кабинет - сохранение редактированной формы страницы
300 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); 303 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page');
301 // кабинет - удаление страницы 304 // кабинет - удаление страницы
302 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); 305 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page');
303 306
304 307
305 // кабинет - реклама сайта 308 // кабинет - реклама сайта
306 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); 309 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames');
307 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); 310 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames');
308 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); 311 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store');
309 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); 312 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames');
310 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); 313 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames');
311 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); 314 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames');
312 //////////////////////////////////////////////////////////////////////// 315 ////////////////////////////////////////////////////////////////////////
313 316
314 317
315 // кабинет - отзывы о работодателе для модерации 318 // кабинет - отзывы о работодателе для модерации
316 Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); 319 Route::get('answers', [EmployersController::class, 'answers'])->name('answers');
317 320
318 // Общая страница статистики 321 // Общая страница статистики
319 Route::get('statics', function () { 322 Route::get('statics', function () {
320 return view('admin.static.index'); 323 return view('admin.static.index');
321 })->name('statics'); 324 })->name('statics');
322 325
323 // кабинет - статистика работников 326 // кабинет - статистика работников
324 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); 327 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers');
325 328
326 // кабинет - статистика вакансий работодателя 329 // кабинет - статистика вакансий работодателя
327 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); 330 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads');
328 331
329 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника 332 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника
330 /* 333 /*
331 * CRUD-операции над справочником дипломы и документы 334 * CRUD-операции над справочником дипломы и документы
332 */ 335 */
333 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); 336 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks');
334 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); 337 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]);
335 338
336 // кабинет - роли пользователя 339 // кабинет - роли пользователя
337 Route::get('roles', [UsersController::class, 'roles'])->name('roles'); 340 Route::get('roles', [UsersController::class, 'roles'])->name('roles');
338 341
339 Route::get('logs', function() { 342 Route::get('logs', function() {
340 $files = Storage::files('logs/laravel.log'); 343 $files = Storage::files('logs/laravel.log');
341 print_r($files); 344 print_r($files);
342 })->name('logs'); 345 })->name('logs');
343 346
344 }); 347 });
345 348
346 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); 349 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload');
347 350
348 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); 351 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page');
349 352
350 Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); 353 Route::get('redis/', [PagesController::class, 'redis'])->name('redis');
351 354
352 Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); 355 Route::get('excel/', [PagesController::class, 'excel'])->name('excel');
353 356