Compare commits

..

23 Commits

Author SHA1 Message Date
ROMANGOLIENKO be5eb8fa82 fixing professor 2024-03-13 11:19:55 +03:00
aslan 6230a15d17 Merge pull request 'cross-browser code added' (#24) from RomanGolienko/Roman_applicant-site:new-design into main
Reviewed-on: http://172.17.254.104/aslan/applicant-site/pulls/24
2024-03-13 10:43:10 +03:00
aslan 4e2d8bec4b add bootstrap validation and Logging for Entrance Examination 2024-03-13 10:26:59 +03:00
aslan 2104362d4e add bootstrap validation and Logging for Education Form 2024-03-12 15:45:48 +03:00
aslan 299817069e add bootstrap validation and Logging for Education Level 2024-03-12 15:32:18 +03:00
aslan 4eee38fea3 add bootsrtap validation and Logging for Examination type 2024-03-12 14:36:35 +03:00
aslan db7704df6e fix to Faculty 2024-03-12 14:36:06 +03:00
aslan 59d2e38110 fix logging level to Faculty 2024-03-12 13:51:06 +03:00
aslan 5cf8061fd5 add bootstrap validated and logging to Subject 2024-03-12 13:50:42 +03:00
aslan ed47971981 disable phpcs for html code in services 2024-03-12 13:09:48 +03:00
aslan 9e689c8b68 Merge branch 'RomanGolienko-new-design' 2024-03-12 12:59:08 +03:00
aslan 08c6632aec Merge branch 'new-design' of http://172.17.254.104/RomanGolienko/Roman_applicant-site into RomanGolienko-new-design 2024-03-12 12:57:25 +03:00
aslan 2c32dd8667 any fix direction profile 2024-03-12 12:45:22 +03:00
aslan 66fdb9d7b0 add Slug Helper 2024-03-12 12:40:40 +03:00
aslan 40414f6da8 add bootstrap validated and logging to Subject Type Profile 2024-03-12 12:40:05 +03:00
aslan 64ad13f96f add bootstrap validated and logging to Direction Profile and fix faculty Logging 2024-03-12 11:22:37 +03:00
aslan e2a7b2ec98 fix scenario for deploy CI 2024-03-12 10:05:06 +03:00
aslan ad97ed8a43 add setup scenario for CI 2024-03-12 09:43:22 +03:00
aslan 2eca5776b9 fix lint & tests errors 2024-03-12 09:38:42 +03:00
aslan 54e3706dd0 Merge pull request 'new-design changes' (#22) from RomanGolienko/Roman_applicant-site:new-design into main
Reviewed-on: http://172.17.254.104/aslan/applicant-site/pulls/22
2024-03-12 09:33:27 +03:00
aslan bbd706bd82 add logging to faculty 2024-03-12 09:32:57 +03:00
aslan 3c37c2b903 add logging to faculty 2024-03-11 14:34:23 +03:00
aslan b9c143bab5 add Logging to project with route admin/logs 2024-03-11 14:31:45 +03:00
69 changed files with 1621 additions and 432 deletions

View File

@ -51,7 +51,7 @@ jobs:
run: composer install
- name: Setup project
run: make setup-test
run: make setup-ci
- name: Check lint
run: make lint
@ -59,21 +59,21 @@ jobs:
- name: Check tests
run: make test
# deploy:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: deploy to test server
# uses: appleboy/ssh-action@v1.0.3
#
# with:
# host: ${{ secrets.HOST }}
# username: ${{ secrets.USERNAME }}
# password: ${{ secrets.PASSWORD }}
# port: ${{ secrets.PORT }}
# script: |
# cd /var/www/test-testabit/
# git stash
# git pull --rebase
# git stash clear
# make setup-test
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: deploy to test server
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: |
cd /var/www/www-root/data/www/testabit.mkgtu.ru
git stash
git pull --rebase
git stash clear
make setup-prod

View File

@ -15,7 +15,7 @@ setup:
npm run build
make ide-helper
setup-test:
setup-ci:
composer install
cp -n .env.example .env
php artisan key:gen --ansi
@ -25,6 +25,11 @@ setup-test:
npm ci
npm run build
setup-prod:
/opt/php82/bin/php /usr/local/bin/composer install
npm ci
npm run build
watch:
npm run watch

View File

@ -3,7 +3,13 @@
namespace App\Helpers;
use App\Models\Direction;
use App\Models\DirectionProfile;
use App\Models\EntranceExamination;
use App\Models\ExaminationType;
use App\Models\Faculty;
use App\Models\EducationalInstitution;
use App\Models\SubjectType;
use App\Models\Subject;
class PositionHelper
{
@ -18,4 +24,40 @@ class PositionHelper
$maxPosition = Direction::max('position');
return $maxPosition >= 254 ? 255 : $maxPosition + 1;
}
public static function educationalInstitution()
{
$maxPosition = EducationalInstitution::max('position');
return $maxPosition >= 254 ? 255 : $maxPosition + 1;
}
public static function directionProfile()
{
$maxPosition = DirectionProfile::max('position');
return $maxPosition >= 254 ? 255 : $maxPosition + 1;
}
public static function subjectType()
{
$maxPosition = SubjectType::max('position');
return $maxPosition >= 254 ? 255 : $maxPosition + 1;
}
public static function subject()
{
$maxPosition = Subject::max('position');
return $maxPosition >= 254 ? 255 : $maxPosition + 1;
}
public static function examinationType()
{
$maxPosition = ExaminationType::max('position');
return $maxPosition >= 254 ? 255 : $maxPosition + 1;
}
public static function entranceExamination()
{
$maxPosition = EntranceExamination::max('position');
return $maxPosition >= 254 ? 255 : $maxPosition + 1;
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace App\Helpers;
use Illuminate\Support\Str;
class SlugHelper
{
public static function get(array $validated): string
{
if ($validated['slug'] === null) {
$transliterationSlug = Str::slug($validated['name']);
$randomNumber = random_int(100, 999);
return "{$transliterationSlug}-{$randomNumber}";
}
return $validated['slug'];
}
}

View File

@ -9,7 +9,6 @@ use App\Models\EntranceExamination;
use App\Models\Faculty;
use Illuminate\Http\Request;
class CalculatorController extends Controller
{
public function findDirectionFromSubjects(Request $request)
@ -24,8 +23,7 @@ class CalculatorController extends Controller
->map(function ($direction) {
return $direction->map(fn($item) => $item['subject_id']);
})
->filter(fn($direction) => count($direction) <= $countUserSubjects)
->keys();
->filter(fn($direction) => count($direction) <= $countUserSubjects)->keys();
$directions = Direction::whereIn('id', $filteredDirectionIds)->get();
@ -33,7 +31,7 @@ class CalculatorController extends Controller
$generateHtml = function ($acc, $direction) {
$department = Department::find($direction->department_id);
$faculty = Faculty::find($department->faculty_id);
// phpcs:disable
return "{$acc} <tr class=\"\">
<td id=\"faculty\"> {$faculty->name} </td>
<td>
@ -93,7 +91,7 @@ class CalculatorController extends Controller
<td class=\"text-end\"> {$direction->period} </td>
</tr>";
};
// phpcs:enable
$html = $directions->reduce($generateHtml, '');
return response()->json(['html' => $html]);

View File

@ -2,6 +2,7 @@
namespace App\Http\Controllers\admin\Catalog\Direction;
use App\Helpers\SlugHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\admin\Catalog\Direction\StoreDirectionProfileRequest;
use App\Http\Requests\admin\Catalog\Direction\UpdateDirectionProfileRequest;
@ -9,6 +10,9 @@ use App\Models\Direction;
use App\Models\DirectionProfile;
use Illuminate\Contracts\View\View;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
class DirectionProfileController extends Controller
{
@ -28,13 +32,21 @@ class DirectionProfileController extends Controller
{
$validated = $request->validated();
$slug = SlugHelper::get($validated);
$directionProfile = new DirectionProfile();
$directionProfile->name = $validated['name'];
$directionProfile->description = $validated['description'];
$directionProfile->slug = $validated['slug'];
$directionProfile->slug = $slug;
$directionProfile->position = $validated['position'];
$directionProfile->save();
Log::channel('app')
->info(
'CREATE профиль подготовки {directionProfile} - user {user}',
['user' => Auth::user()->name, 'directionProfile' => $directionProfile->name, 'data' => $validated]
);
return redirect()->route('direction_profiles.index');
}
@ -55,6 +67,7 @@ class DirectionProfileController extends Controller
public function update(UpdateDirectionProfileRequest $request, DirectionProfile $directionProfile): RedirectResponse
{
$validated = $request->validated();
$oldData = $directionProfile->toArray();
$directionProfile->name = $validated['name'];
$directionProfile->description = $validated['description'];
@ -62,14 +75,43 @@ class DirectionProfileController extends Controller
$directionProfile->position = $validated['position'];
$directionProfile->save();
Log::channel('app')
->warning(
'UPDATE профиль подготовки {directionProfile} - user {user}',
[
'user' => Auth::user()->name,
'directionProfile' => $directionProfile->name,
'oldData' => $oldData,
'newData' => $validated
]
);
return redirect()->route('direction_profiles.index');
}
public function destroy(DirectionProfile $directionProfile): RedirectResponse
{
if ($directionProfile->direction()->exists()) {
Log::channel('app')
->error(
'NOT DELETE профиль подготовки {directionProfile} - user {user}',
[
'user' => Auth::user()->name,
'directionProfile' => $directionProfile->name,
'data' => $directionProfile->toArray(),
]
);
return back();
}
Log::channel('app')
->critical(
'DELETE профиль подготовки {directionProfile} - user {user}',
[
'user' => Auth::user()->name,
'directionProfile' => $directionProfile->name,
'data' => $directionProfile->toArray(),
]
);
$directionProfile->delete();
return redirect()->route('direction_profiles.index');
}

View File

@ -2,6 +2,7 @@
namespace App\Http\Controllers\admin\Catalog\Direction;
use App\Helpers\SlugHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\admin\Catalog\Direction\StoreEducationFormRequest;
use App\Http\Requests\admin\Catalog\Direction\UpdateEducationFormRequest;
@ -9,6 +10,8 @@ use App\Models\EducationForm;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
class EducationFormController extends Controller
{
@ -26,12 +29,20 @@ class EducationFormController extends Controller
public function store(StoreEducationFormRequest $request)
{
$validated = $request->validated();
$slug = SlugHelper::get($validated);
$form = new EducationForm();
$form->name = $validated['name'];
$form->description = $validated['description'];
$form->slug = $validated['slug'];
$form->slug = $slug;
$form->save();
Log::channel('app')
->info(
'CREATE форма образования {educationForm} - user {user}',
['user' => Auth::user()->name, 'educationForm' => $form->name, 'data' => $validated]
);
return redirect()->route('education_forms.index');
}
@ -49,10 +60,23 @@ class EducationFormController extends Controller
public function update(UpdateEducationFormRequest $request, EducationForm $educationForm)
{
$validated = $request->validated();
$oldData = $educationForm->toArray();
$educationForm->name = $validated['name'];
$educationForm->description = $validated['description'];
$educationForm->slug = $validated['slug'];
Log::channel('app')
->warning(
'UPDATE форма образования {educationForm} - user {user}',
[
'user' => Auth::user()->name,
'educationForm' => $educationForm->name,
'oldData' => $oldData,
'newData' => $validated
]
);
$educationForm->save();
return redirect()->route('education_forms.index');
@ -61,8 +85,26 @@ class EducationFormController extends Controller
public function destroy(EducationForm $educationForm)
{
if ($educationForm->directions()->exists()) {
Log::channel('app')
->error(
'NOT DELETE форма образования {educationForm} - user {user}',
[
'user' => Auth::user()->name,
'educationForm' => $educationForm->name,
'data' => $educationForm->toArray(),
]
);
return back();
}
Log::channel('app')
->critical(
'DELETE факультет {faculty} - user {user}',
[
'user' => Auth::user()->name,
'educationForm' => $educationForm->name,
'data' => $educationForm->toArray(),
]
);
$educationForm->delete();
return redirect()->route('education_forms.index');
}

View File

@ -2,6 +2,7 @@
namespace App\Http\Controllers\admin\Catalog\Direction;
use App\Helpers\SlugHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\admin\Catalog\Direction\StoreEducationLevelRequest;
use App\Http\Requests\admin\Catalog\Direction\UpdateEducationLevelRequest;
@ -10,6 +11,8 @@ use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Foundation\Application;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
class EducationLevelController extends Controller
{
@ -27,18 +30,25 @@ class EducationLevelController extends Controller
public function store(StoreEducationLevelRequest $request): RedirectResponse
{
$validated = $request->validated();
$slug = SlugHelper::get($validated);
$level = new EducationLevel();
$level->name = $validated['name'];
$level->description = $validated['description'];
$level->slug = $validated['slug'];
$level->slug = $slug;
$level->save();
Log::channel('app')
->info(
'CREATE уровень образования {educationLevel} - user {user}',
['user' => Auth::user()->name, 'educationLevel' => $level->name, 'data' => $validated]
);
return redirect()->route('education_levels.index');
}
public function show(
EducationLevel $educationLevel
): View|Application|Factory|\Illuminate\Contracts\Foundation\Application {
public function show(EducationLevel $educationLevel): View
{
$directions = $educationLevel->directions();
return view(
'admin.catalog.direction.education_level.show',
@ -54,10 +64,22 @@ class EducationLevelController extends Controller
public function update(UpdateEducationLevelRequest $request, EducationLevel $educationLevel): RedirectResponse
{
$validated = $request->validated();
$oldData = $educationLevel->toArray();
$educationLevel->name = $validated['name'];
$educationLevel->description = $validated['description'];
$educationLevel->slug = $validated['slug'];
Log::channel('app')
->warning(
'UPDATE уровень образования {educationLevel} - user {user}',
[
'user' => Auth::user()->name,
'educationLevel' => $educationLevel->name,
'oldData' => $oldData,
'newData' => $validated
]
);
$educationLevel->save();
return redirect()->route('education_levels.index');
@ -66,8 +88,26 @@ class EducationLevelController extends Controller
public function destroy(EducationLevel $educationLevel)
{
if ($educationLevel->directions()->exists()) {
Log::channel('app')
->error(
'NOT DELETE уровень образования {educationLevel} - user {user}',
[
'user' => Auth::user()->name,
'educationLevel' => $educationLevel->name,
'data' => $educationLevel->toArray(),
]
);
return back();
}
Log::channel('app')
->critical(
'DELETE уровень образования {educationLevel} - user {user}',
[
'user' => Auth::user()->name,
'educationLevel' => $educationLevel->name,
'data' => $educationLevel->toArray(),
]
);
$educationLevel->delete();
return redirect()->route('education_levels.index');
}

View File

@ -12,6 +12,8 @@ use App\Models\Subject;
use App\Models\SubjectType;
use Illuminate\Contracts\View\View;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
class EntranceExaminationController extends Controller
{
@ -51,6 +53,12 @@ class EntranceExaminationController extends Controller
$entranceExamination->subject_type_id = $validated['subject_type_id'];
$entranceExamination->save();
Log::channel('app')
->info(
'CREATE вступ. испытания {entranceExamination} - user {user}',
['user' => Auth::user()->name, 'entranceExamination' => $entranceExamination->name, 'data' => $validated]
);
return redirect()->route('entrance_examinations.index');
}
@ -85,6 +93,7 @@ class EntranceExaminationController extends Controller
EntranceExamination $entranceExamination
): RedirectResponse {
$validated = $request->validated();
$oldData = $entranceExamination->toArray();
$entranceExamination->examination_type_id = $validated['examination_type_id'];
$entranceExamination->direction_id = $validated['direction_id'];
@ -92,6 +101,17 @@ class EntranceExaminationController extends Controller
$entranceExamination->scores = $validated['scores'];
$entranceExamination->position = $validated['position'];
$entranceExamination->subject_type_id = $validated['subject_type_id'];
Log::channel('app')
->warning(
'UPDATE вступ. испытания {entranceExamination} - user {user}',
[
'user' => Auth::user()->name,
'entranceExamination' => $entranceExamination->name,
'oldData' => $oldData,
'newData' => $validated
]
);
$entranceExamination->save();
return redirect()->route('entrance_examinations.index');
@ -99,6 +119,15 @@ class EntranceExaminationController extends Controller
public function destroy(EntranceExamination $entranceExamination): RedirectResponse
{
Log::channel('app')
->critical(
'DELETE вступ. испытания {entranceExamination} - user {user}',
[
'user' => Auth::user()->name,
'entranceExamination' => $entranceExamination->name,
'data' => $entranceExamination->toArray(),
]
);
$entranceExamination->delete();
return redirect()->route('entrance_examinations.index');
}

View File

@ -2,12 +2,15 @@
namespace App\Http\Controllers\admin\Catalog\Direction;
use App\Helpers\SlugHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\admin\Catalog\Direction\StoreExaminationTypeRequest;
use App\Http\Requests\admin\Catalog\Direction\UpdateExaminationTypeRequest;
use App\Models\ExaminationType;
use Illuminate\Contracts\View\View;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
class ExaminationTypeController extends Controller
{
@ -26,13 +29,21 @@ class ExaminationTypeController extends Controller
{
$validated = $request->validated();
$slug = SlugHelper::get($validated);
$type = new ExaminationType();
$type->name = $validated['name'];
$type->description = $validated['description'];
$type->slug = $validated['slug'];
$type->slug = $slug;
$type->position = $validated['position'];
$type->save();
Log::channel('app')
->info(
'CREATE тип экзамена {examinationType} - user {user}',
['user' => Auth::user()->name, 'faculty' => $type->name, 'data' => $validated]
);
return redirect()->route('examination_types.index');
}
@ -49,21 +60,52 @@ class ExaminationTypeController extends Controller
public function update(UpdateExaminationTypeRequest $request, ExaminationType $examinationType): RedirectResponse
{
$validated = $request->validated();
$oldData = $examinationType->toArray();
$examinationType->name = $validated['name'];
$examinationType->description = $validated['description'];
$examinationType->slug = $validated['slug'];
$examinationType->position = $validated['position'];
$examinationType->save();
Log::channel('app')
->warning(
'UPDATE тип экзамена {examinationType} - user {user}',
[
'user' => Auth::user()->name,
'examinationType' => $examinationType->name,
'oldData' => $oldData,
'newData' => $validated
]
);
$examinationType->save();
return redirect()->route('examination_types.index');
}
public function destroy(ExaminationType $examinationType): RedirectResponse
{
if ($examinationType->entranceExaminations()->exists()) {
Log::channel('app')
->error(
'NOT DELETE тип экзамена {examinationType} - user {user}',
[
'user' => Auth::user()->name,
'examinationType' => $examinationType->name,
'data' => $examinationType->toArray(),
]
);
return back();
}
Log::channel('app')
->critical(
'DELETE тип экзамена {examinationType} - user {user}',
[
'user' => Auth::user()->name,
'examinationType' => $examinationType->name,
'data' => $examinationType->toArray(),
]
);
$examinationType->delete();
return redirect()->route('examination_types.index');
}

View File

@ -2,12 +2,15 @@
namespace App\Http\Controllers\admin\Catalog\Direction;
use App\Helpers\SlugHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\admin\Catalog\Direction\StoreSubjectRequest;
use App\Http\Requests\admin\Catalog\Direction\UpdateSubjectRequest;
use App\Models\Subject;
use Illuminate\Contracts\View\View;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
class SubjectController extends Controller
{
@ -26,13 +29,21 @@ class SubjectController extends Controller
{
$validated = $request->validated();
$slug = SlugHelper::get($validated);
$subject = new Subject();
$subject->name = $validated['name'];
$subject->description = $validated['description'];
$subject->slug = $validated['slug'];
$subject->slug = $slug;
$subject->position = $validated['position'];
$subject->save();
Log::channel('app')
->info(
'CREATE предмет {subject} - user {user}',
['user' => Auth::user()->name, 'faculty' => $subject->name, 'data' => $validated]
);
return redirect()->route('subjects.index');
}
@ -49,21 +60,51 @@ class SubjectController extends Controller
public function update(UpdateSubjectRequest $request, Subject $subject): RedirectResponse
{
$validated = $request->validated();
$oldData = $subject->toArray();
$subject->name = $validated['name'];
$subject->description = $validated['description'];
$subject->slug = $validated['slug'];
$subject->position = $validated['position'];
$subject->save();
Log::channel('app')
->warning(
'UPDATE предмет {subject} - user {user}',
[
'user' => Auth::user()->name,
'subject' => $subject->name,
'oldData' => $oldData,
'newData' => $validated
]
);
$subject->save();
return redirect()->route('subjects.index');
}
public function destroy(Subject $subject): RedirectResponse
{
if ($subject->entranceExaminations()->exists()) {
Log::channel('app')
->error(
'NOT DELETE предмет {subject} - user {user}',
[
'user' => Auth::user()->name,
'subject' => $subject->name,
'data' => $subject->toArray(),
]
);
return back();
}
Log::channel('app')
->critical(
'DELETE предмет {subject} - user {user}',
[
'user' => Auth::user()->name,
'subject' => $subject->name,
'data' => $subject->toArray(),
]
);
$subject->delete();
return redirect()->route('subjects.index');
}

View File

@ -2,12 +2,16 @@
namespace App\Http\Controllers\admin\Catalog\Direction;
use App\Helpers\SlugHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\admin\Catalog\Direction\StoreSubjectTypeRequest;
use App\Http\Requests\admin\Catalog\Direction\UpdateSubjectTypeRequest;
use App\Models\SubjectType;
use Illuminate\Contracts\View\View;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
class SubjectTypeController extends Controller
{
@ -26,13 +30,21 @@ class SubjectTypeController extends Controller
{
$validated = $request->validated();
$slug = SlugHelper::get($validated);
$type = new SubjectType();
$type->name = $validated['name'];
$type->description = $validated['description'];
$type->slug = $validated['slug'];
$type->slug = $slug;
$type->position = $validated['position'];
$type->save();
Log::channel('app')
->info(
'CREATE тип предмета {subjectType} - user {user}',
['user' => Auth::user()->name, 'subjectType' => $type->name, 'data' => $validated]
);
return redirect()->route('subject_types.index');
}
@ -49,6 +61,7 @@ class SubjectTypeController extends Controller
public function update(UpdateSubjectTypeRequest $request, SubjectType $subjectType): RedirectResponse
{
$validated = $request->validated();
$oldData = $subjectType->toArray();
$subjectType->name = $validated['name'];
$subjectType->description = $validated['description'];
@ -56,14 +69,43 @@ class SubjectTypeController extends Controller
$subjectType->position = $validated['position'];
$subjectType->save();
Log::channel('app')
->warning(
'UPDATE тип предмета {subjectType} - user {user}',
[
'user' => Auth::user()->name,
'subjectType' => $subjectType->name,
'oldData' => $oldData,
'newData' => $validated
]
);
return redirect()->route('subject_types.index');
}
public function destroy(SubjectType $subjectType): RedirectResponse
{
if ($subjectType->entranceExaminations()->exists()) {
Log::channel('app')
->error(
'NOT DELETE тип предмета {subjectType} - user {user}',
[
'user' => Auth::user()->name,
'subjectType' => $subjectType->name,
'data' => $subjectType->toArray(),
]
);
return back();
}
Log::channel('app')
->critical(
'DELETE тип предмета {subjectType} - user {user}',
[
'user' => Auth::user()->name,
'subjectType' => $subjectType->name,
'data' => $subjectType->toArray(),
]
);
$subjectType->delete();
return redirect()->route('subject_types.index');
}

View File

@ -2,6 +2,7 @@
namespace App\Http\Controllers\admin\Catalog;
use App\Helpers\SlugHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\admin\Catalog\StoreFacultyRequest;
use App\Http\Requests\admin\Catalog\UpdateFacultyRequest;
@ -11,6 +12,8 @@ use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Foundation\Application;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
class FacultyController extends Controller
@ -31,13 +34,7 @@ class FacultyController extends Controller
{
$validated = $request->validated();
if ($validated['slug'] === null) {
$transliterationSlug = Str::slug($validated['name']);
$randomNumber = random_int(100, 999);
$slug = "{$transliterationSlug}-{$randomNumber}";
} else {
$slug = $validated['slug'];
}
$slug = SlugHelper::get($validated);
$faculty = new Faculty();
$faculty->name = $validated['name'];
@ -47,6 +44,12 @@ class FacultyController extends Controller
$faculty->educational_institution_id = $validated['educational_institution_id'];
$faculty->save();
Log::channel('app')
->info(
'CREATE факультет {faculty} - user {user}',
['user' => Auth::user()->name, 'faculty' => $faculty->name, 'data' => $validated]
);
return redirect()->route('faculties.index');
}
@ -64,22 +67,52 @@ class FacultyController extends Controller
public function update(UpdateFacultyRequest $request, Faculty $faculty): RedirectResponse
{
$validated = $request->validated();
$oldData = $faculty->toArray();
$faculty->name = $validated['name'];
$faculty->description = $validated['description'];
$faculty->position = $validated['position'];
$faculty->slug = $validated['slug'];
$faculty->educational_institution_id = $validated['educational_institution_id'];
$faculty->save();
Log::channel('app')
->warning(
'UPDATE факультет {faculty} - user {user}',
[
'user' => Auth::user()->name,
'faculty' => $faculty->name,
'oldData' => $oldData,
'newData' => $validated
]
);
$faculty->save();
return redirect()->route('faculties.index');
}
public function destroy(Faculty $faculty): RedirectResponse
{
if ($faculty->departments()->exists()) {
Log::channel('app')
->error(
'NOT DELETE факультет {faculty} - user {user}',
[
'user' => Auth::user()->name,
'faculty' => $faculty->name,
'data' => $faculty->toArray(),
]
);
return back();
}
Log::channel('app')
->critical(
'DELETE факультет {faculty} - user {user}',
[
'user' => Auth::user()->name,
'faculty' => $faculty->name,
'data' => $faculty->toArray(),
]
);
$faculty->delete();
return redirect()->route('faculties.index');
}

View File

@ -15,9 +15,26 @@ class StoreDirectionProfileRequest extends FormRequest
{
return [
'name' => 'required|string|max:255|unique:direction_profiles,name',
'description' => 'string',
'slug' => 'required|string|max:255|unique:direction_profiles,slug',
'description' => 'nullable|string',
'slug' => 'nullable|string|max:255|unique:direction_profiles,slug',
'position' => 'required|int|numeric|max:255',
];
}
public function messages(): array
{
return [
'position.required' => 'Поле позиция обязательно.',
'position.int' => 'Позиция должно быть целым числом.',
'position.numeric' => 'Позиция должно быть числом.',
'position.max' => 'Позиция не должен быть больше :max',
'name.required' => 'Поле название обязательно.',
'name.string' => 'Поле название должен быть строкой.',
'name.max' => 'Поле название не должен превышать :max символов.',
'name.unique' => 'Название уже занят.',
'description.string' => 'Поле описание должен быть строкой.',
'slug.string' => 'Поле URL должен быть строкой.',
'slug.max' => 'Поле URL не должен превышать :max символов.',
];
}
}

View File

@ -15,8 +15,21 @@ class StoreEducationFormRequest extends FormRequest
{
return [
'name' => 'required|string|max:255|unique:education_levels,name',
'description' => 'string',
'slug' => 'required|string|max:255|unique:education_levels,slug',
'description' => 'nullable|string',
'slug' => 'nullable|string|max:255|unique:education_levels,slug',
];
}
public function messages(): array
{
return [
'name.required' => 'Поле название обязательно.',
'name.string' => 'Поле название должен быть строкой.',
'name.max' => 'Поле название не должен превышать :max символов.',
'name.unique' => 'Название уже занят.',
'description.string' => 'Поле описание должен быть строкой.',
'slug.string' => 'Поле URL должен быть строкой.',
'slug.max' => 'Поле URL не должен превышать :max символов.',
];
}
}

View File

@ -15,8 +15,21 @@ class StoreEducationLevelRequest extends FormRequest
{
return [
'name' => 'required|string|max:255|unique:education_levels,name',
'description' => 'string',
'slug' => 'required|string|max:255|unique:education_levels,slug',
'description' => 'nullable|string',
'slug' => 'nullable|string|max:255|unique:education_levels,slug',
];
}
public function messages(): array
{
return [
'name.required' => 'Поле название обязательно.',
'name.string' => 'Поле название должен быть строкой.',
'name.max' => 'Поле название не должен превышать :max символов.',
'name.unique' => 'Название уже занят.',
'description.string' => 'Поле описание должен быть строкой.',
'slug.string' => 'Поле URL должен быть строкой.',
'slug.max' => 'Поле URL не должен превышать :max символов.',
];
}
}

View File

@ -18,8 +18,38 @@ class StoreEntranceExaminationRequest extends FormRequest
'examination_type_id' => 'required|numeric|int|max:1000',
'subject_id' => 'required|numeric|int|max:1000',
'subject_type_id' => 'required|numeric|int|max:1000',
'scores' => 'required|numeric|int|max:1000',
'scores' => 'required|numeric|int|max:100',
'position' => 'required|numeric|int|max:1000',
];
}
public function messages(): array
{
return [
'position.required' => 'Поле позиция обязательно.',
'position.int' => 'Позиция должно быть целым числом.',
'position.numeric' => 'Позиция должно быть числом.',
'position.max' => 'Позиция не должен быть больше :max',
'direction_id.required' => 'Поле позиция обязательно.',
'direction_id.int' => 'Позиция должно быть целым числом.',
'direction_id.numeric' => 'Позиция должно быть числом.',
'direction_id.max' => 'Позиция не должен быть больше :max',
'examination_type_id.required' => 'Поле позиция обязательно.',
'examination_type_id.int' => 'Позиция должно быть целым числом.',
'examination_type_id.numeric' => 'Позиция должно быть числом.',
'examination_type_id.max' => 'Позиция не должен быть больше :max',
'subject_id.required' => 'Поле позиция обязательно.',
'subject_id.int' => 'Позиция должно быть целым числом.',
'subject_id.numeric' => 'Позиция должно быть числом.',
'subject_id.max' => 'Позиция не должен быть больше :max',
'subject_type_id.required' => 'Поле позиция обязательно.',
'subject_type_id.int' => 'Позиция должно быть целым числом.',
'subject_type_id.numeric' => 'Позиция должно быть числом.',
'subject_type_id.max' => 'Позиция не должен быть больше :max',
'scores.required' => 'Поле позиция обязательно.',
'scores.int' => 'Позиция должно быть целым числом.',
'scores.numeric' => 'Позиция должно быть числом.',
'scores.max' => 'Позиция не должен быть больше :max',
];
}
}

View File

@ -16,8 +16,24 @@ class StoreExaminationTypeRequest extends FormRequest
return [
'position' => 'required|int|numeric|max:255',
'name' => 'required|string|max:255|unique:examination_types,name',
'description' => 'string',
'slug' => 'required|string|max:255|unique:examination_types,slug',
'description' => 'nullable|string',
'slug' => 'nullable|string|max:255|unique:examination_types,slug',
];
}
public function messages(): array
{
return [
'position.required' => 'Поле позиция обязательно.',
'position.int' => 'Позиция должно быть целым числом.',
'position.numeric' => 'Позиция должно быть числом.',
'position.max' => 'Позиция не должен быть больше :max',
'name.required' => 'Поле название обязательно.',
'name.string' => 'Поле название должен быть строкой.',
'name.max' => 'Поле название не должен превышать :max символов.',
'name.unique' => 'Название уже занят.',
'description.string' => 'Поле описание должен быть строкой.',
'slug.string' => 'Поле URL должен быть строкой.',
'slug.max' => 'Поле URL не должен превышать :max символов.',
];
}
}

View File

@ -16,8 +16,25 @@ class StoreSubjectRequest extends FormRequest
return [
'position' => 'required|int|numeric|max:255',
'name' => 'required|string|max:255|unique:subjects,name',
'description' => 'string',
'slug' => 'required|string|max:255|unique:subjects,slug',
'description' => 'nullable|string',
'slug' => 'nullable|string|max:255|unique:subjects,slug',
];
}
public function messages(): array
{
return [
'position.required' => 'Поле позиция обязательно.',
'position.int' => 'Позиция должно быть целым числом.',
'position.numeric' => 'Позиция должно быть числом.',
'position.max' => 'Позиция не должен быть больше :max',
'name.required' => 'Поле название обязательно.',
'name.string' => 'Поле название должен быть строкой.',
'name.max' => 'Поле название не должен превышать :max символов.',
'name.unique' => 'Название уже занят.',
'description.string' => 'Поле описание должен быть строкой.',
'slug.string' => 'Поле URL должен быть строкой.',
'slug.max' => 'Поле URL не должен превышать :max символов.',
];
}
}

View File

@ -14,10 +14,27 @@ class StoreSubjectTypeRequest extends FormRequest
public function rules(): array
{
return [
'position' => 'required|int|numeric|max:255',
'name' => 'required|string|max:255|unique:subject_types,name',
'description' => 'string',
'slug' => 'required|string|max:255|unique:subject_types,slug',
'description' => 'nullable|string',
'slug' => 'nullable|string|max:255|unique:subject_types,slug',
'position' => 'required|int|numeric|max:255',
];
}
public function messages(): array
{
return [
'position.required' => 'Поле позиция обязательно.',
'position.int' => 'Позиция должно быть целым числом.',
'position.numeric' => 'Позиция должно быть числом.',
'position.max' => 'Позиция не должен быть больше :max',
'name.required' => 'Поле название обязательно.',
'name.string' => 'Поле название должен быть строкой.',
'name.max' => 'Поле название не должен превышать :max символов.',
'name.unique' => 'Название уже занят.',
'description.string' => 'Поле описание должен быть строкой.',
'slug.string' => 'Поле URL должен быть строкой.',
'slug.max' => 'Поле URL не должен превышать :max символов.',
];
}
}

View File

@ -14,10 +14,37 @@ class UpdateDirectionProfileRequest extends FormRequest
public function rules(): array
{
return [
'name' => "required|string|max:255|unique:direction_profiles,name,{$this->direction_profile->id}",
'description' => 'string',
'slug' => "required|string|max:255|unique:direction_profiles,slug,{$this->direction_profile->id}",
'name' => [
'required',
'string',
'max:255',
"unique:direction_profiles,name,{$this->direction_profile->id}"
],
'description' => 'nullable|string',
'slug' => [
'required',
'string',
'max:255',
"unique:direction_profiles,slug,{$this->direction_profile->id}"
],
'position' => 'required|int|numeric|max:255',
];
}
public function messages(): array
{
return [
'position.required' => 'Поле позиция обязательно.',
'position.int' => 'Позиция должно быть целым числом.',
'position.numeric' => 'Позиция должно быть числом.',
'position.max' => 'Позиция не должен быть больше :max',
'name.required' => 'Поле название обязательно.',
'name.string' => 'Поле название должен быть строкой.',
'name.max' => 'Поле название не должен превышать :max символов.',
'name.unique' => 'Название уже занят.',
'description.string' => 'Поле описание должен быть строкой.',
'slug.string' => 'Поле URL должен быть строкой.',
'slug.max' => 'Поле URL не должен превышать :max символов.',
];
}
}

View File

@ -15,8 +15,21 @@ class UpdateEducationFormRequest extends FormRequest
{
return [
'name' => "required|string|max:255|unique:education_forms,name,{$this->education_form->id}",
'description' => 'string',
'description' => 'nullable|string',
'slug' => "required|string|max:255|unique:education_forms,slug,{$this->education_form->id}",
];
}
public function messages(): array
{
return [
'name.required' => 'Поле название обязательно.',
'name.string' => 'Поле название должен быть строкой.',
'name.max' => 'Поле название не должен превышать :max символов.',
'name.unique' => 'Название уже занят.',
'description.string' => 'Поле описание должен быть строкой.',
'slug.string' => 'Поле URL должен быть строкой.',
'slug.max' => 'Поле URL не должен превышать :max символов.',
];
}
}

View File

@ -15,8 +15,21 @@ class UpdateEducationLevelRequest extends FormRequest
{
return [
'name' => "required|string|max:255|unique:education_levels,name,{$this->education_level->id}",
'description' => 'string',
'description' => 'nullable|string',
'slug' => "required|string|max:255|unique:education_levels,slug,{$this->education_level->id}",
];
}
public function messages(): array
{
return [
'name.required' => 'Поле название обязательно.',
'name.string' => 'Поле название должен быть строкой.',
'name.max' => 'Поле название не должен превышать :max символов.',
'name.unique' => 'Название уже занят.',
'description.string' => 'Поле описание должен быть строкой.',
'slug.string' => 'Поле URL должен быть строкой.',
'slug.max' => 'Поле URL не должен превышать :max символов.',
];
}
}

View File

@ -18,8 +18,38 @@ class UpdateEntranceExaminationRequest extends FormRequest
'examination_type_id' => 'required|numeric|int|max:1000',
'subject_id' => 'required|numeric|int|max:1000',
'subject_type_id' => 'required|numeric|int|max:1000',
'scores' => 'required|numeric|int|max:1000',
'scores' => 'required|numeric|int|max:100',
'position' => 'required|numeric|int|max:1000',
];
}
public function messages(): array
{
return [
'position.required' => 'Поле позиция обязательно.',
'position.int' => 'Позиция должно быть целым числом.',
'position.numeric' => 'Позиция должно быть числом.',
'position.max' => 'Позиция не должен быть больше :max',
'direction_id.required' => 'Поле позиция обязательно.',
'direction_id.int' => 'Позиция должно быть целым числом.',
'direction_id.numeric' => 'Позиция должно быть числом.',
'direction_id.max' => 'Позиция не должен быть больше :max',
'examination_type_id.required' => 'Поле позиция обязательно.',
'examination_type_id.int' => 'Позиция должно быть целым числом.',
'examination_type_id.numeric' => 'Позиция должно быть числом.',
'examination_type_id.max' => 'Позиция не должен быть больше :max',
'subject_id.required' => 'Поле позиция обязательно.',
'subject_id.int' => 'Позиция должно быть целым числом.',
'subject_id.numeric' => 'Позиция должно быть числом.',
'subject_id.max' => 'Позиция не должен быть больше :max',
'subject_type_id.required' => 'Поле позиция обязательно.',
'subject_type_id.int' => 'Позиция должно быть целым числом.',
'subject_type_id.numeric' => 'Позиция должно быть числом.',
'subject_type_id.max' => 'Позиция не должен быть больше :max',
'scores.required' => 'Поле позиция обязательно.',
'scores.int' => 'Позиция должно быть целым числом.',
'scores.numeric' => 'Позиция должно быть числом.',
'scores.max' => 'Позиция не должен быть больше :max',
];
}
}

View File

@ -15,7 +15,7 @@ class UpdateExaminationTypeRequest extends FormRequest
{
return [
'position' => 'required|int|numeric|max:255',
'description' => 'string',
'description' => 'nullable|string',
'slug' => [
'string',
'required',
@ -30,4 +30,21 @@ class UpdateExaminationTypeRequest extends FormRequest
],
];
}
public function messages(): array
{
return [
'position.required' => 'Поле позиция обязательно.',
'position.int' => 'Позиция должно быть целым числом.',
'position.numeric' => 'Позиция должно быть числом.',
'position.max' => 'Позиция не должен быть больше :max',
'name.required' => 'Поле название обязательно.',
'name.string' => 'Поле название должен быть строкой.',
'name.max' => 'Поле название не должен превышать :max символов.',
'name.unique' => 'Название уже занят.',
'description.string' => 'Поле описание должен быть строкой.',
'slug.string' => 'Поле URL должен быть строкой.',
'slug.max' => 'Поле URL не должен превышать :max символов.',
];
}
}

View File

@ -15,7 +15,7 @@ class UpdateSubjectRequest extends FormRequest
{
return [
'position' => 'required|int|numeric|max:255',
'description' => 'string',
'description' => 'nullable|string',
'slug' => [
'string',
'required',

View File

@ -15,7 +15,7 @@ class UpdateSubjectTypeRequest extends FormRequest
{
return [
'position' => 'required|int|numeric|max:255',
'description' => 'string',
'description' => 'nullable|string',
'slug' => [
'string',
'required',
@ -30,4 +30,21 @@ class UpdateSubjectTypeRequest extends FormRequest
],
];
}
public function messages(): array
{
return [
'position.required' => 'Поле позиция обязательно.',
'position.int' => 'Позиция должно быть целым числом.',
'position.numeric' => 'Позиция должно быть числом.',
'position.max' => 'Позиция не должен быть больше :max',
'name.required' => 'Поле название обязательно.',
'name.string' => 'Поле название должен быть строкой.',
'name.max' => 'Поле название не должен превышать :max символов.',
'name.unique' => 'Название уже занят.',
'description.string' => 'Поле описание должен быть строкой.',
'slug.string' => 'Поле URL должен быть строкой.',
'slug.max' => 'Поле URL не должен превышать :max символов.',
];
}
}

View File

@ -18,7 +18,7 @@ class StoreFacultyRequest extends FormRequest
'position' => 'required|int|numeric|max:255',
'name' => 'required|string|max:255|unique:faculties,name',
'description' => 'nullable|string',
'slug' => 'nullable|string|max:255',
'slug' => 'nullable|string|max:255|unique:faculties,slug',
'educational_institution_id' => 'required|int|numeric|max:1000'
];
}

View File

@ -15,9 +15,9 @@ class UpdateFacultyRequest extends FormRequest
{
return [
'position' => 'required|int|numeric|max:255',
'name' => ['required', 'string', 'max:255', "unique:faculties,name,{$this->faculty->id}",],
'description' => 'string',
'slug' => ['required', 'string', 'max:255', "unique:faculties,slug,{$this->faculty->id}",],
'name' => ['required', 'string', 'max:255', "unique:faculties,name,{$this->faculty->id}"],
'description' => 'nullable|string',
'slug' => ['required', 'string', 'max:255', "unique:faculties,slug,{$this->faculty->id}"],
'educational_institution_id' => 'required|int|numeric|max:1000',
];
}

View File

@ -13,6 +13,8 @@ class DirectonHtmlBuilder
}
public function getHTML()
{
// phpcs:disable
$direction = $this->direction;
return "<div class=\"offcanvas offcanvas-bottom\" data-bs-scroll=\"true\" data-bs-backdrop=\"false\" tabindex=\"-1\" id=\"offcanvasScrolling-{$direction->id }\" aria-labelledby=\"offcanvasScrollingLabel-{$direction->id}\" style=\"height: 100%; font-family: Geologica-Medium;overflow-y: auto ;\">
<div class=\"mx-5\">
@ -65,4 +67,5 @@ class DirectonHtmlBuilder
</div> ";
}
// phpcs:enable
}

View File

@ -8,7 +8,7 @@
],
"license": "MIT",
"require": {
"php": "^8.3",
"php": "^8",
"fakerphp/faker": "^1.23.1",
"guzzlehttp/guzzle": "^7.8.1",
"imangazaliev/didom": "^2.0.1",
@ -18,6 +18,7 @@
"laravel/ui": "^4.5.0",
"laravelcollective/html": "^6.4.1",
"league/flysystem": "^3.25.0",
"rap2hpoutre/laravel-log-viewer": "^2.3",
"twbs/bootstrap": "5.2.3"
},
"require-dev": {

67
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "a8ef8e1a8cc4569e75864f1e869dcb34",
"content-hash": "510b89acb2330588f3b2a70ee33a7e2e",
"packages": [
{
"name": "brick/math",
@ -3435,6 +3435,69 @@
],
"time": "2023-11-08T05:53:05+00:00"
},
{
"name": "rap2hpoutre/laravel-log-viewer",
"version": "v2.3.0",
"source": {
"type": "git",
"url": "https://github.com/rap2hpoutre/laravel-log-viewer.git",
"reference": "c4148ec364d78be13eb2ab81ce860946bfd91c4c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/rap2hpoutre/laravel-log-viewer/zipball/c4148ec364d78be13eb2ab81ce860946bfd91c4c",
"reference": "c4148ec364d78be13eb2ab81ce860946bfd91c4c",
"shasum": ""
},
"require": {
"illuminate/support": "4.2.*|5.*|^6.0|^7.0|^8.0|^9.0|^10.0",
"php": ">=5.4.0"
},
"require-dev": {
"orchestra/testbench": "3.7.*|^7.0",
"phpunit/phpunit": "^7|^9.5.10"
},
"type": "laravel-package",
"extra": {
"laravel": {
"providers": [
"Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider"
]
}
},
"autoload": {
"psr-0": {
"Rap2hpoutre\\LaravelLogViewer\\": "src/"
},
"classmap": [
"src/controllers"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "rap2hpoutre",
"email": "raphaelht@gmail.com"
}
],
"description": "A Laravel log reader",
"keywords": [
"laravel",
"log",
"log-reader",
"log-viewer",
"logging",
"lumen"
],
"support": {
"issues": "https://github.com/rap2hpoutre/laravel-log-viewer/issues",
"source": "https://github.com/rap2hpoutre/laravel-log-viewer/tree/v2.3.0"
},
"time": "2023-02-15T07:36:34+00:00"
},
{
"name": "symfony/console",
"version": "v6.4.4",
@ -9409,7 +9472,7 @@
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": "^8.3"
"php": "^8"
},
"platform-dev": [],
"plugin-api-version": "2.6.0"

View File

@ -58,6 +58,14 @@ return [
'ignore_exceptions' => false,
],
'app' => [
'driver' => 'single',
'path' => storage_path('logs/app.log'),
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),

View File

@ -10,10 +10,10 @@ return new class extends Migration
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->string('name', 255);
$table->string('email', 255)->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->string('password', 255);
$table->rememberToken();
$table->timestamps();
});

View File

@ -10,10 +10,10 @@ return new class extends Migration
{
Schema::create('admissions', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('name', 255)->unique();
$table->text('description')->nullable();
$table->string('slug');
$table->integer('position');
$table->string('slug', 255)->unique();
$table->smallInteger('position');
$table->timestamps();
});
}

View File

@ -10,11 +10,11 @@ return new class extends Migration
{
Schema::create('documents', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('name', 255)->unique();
$table->string('file_name')->nullable();
$table->text('description')->nullable();
$table->string('url');
$table->integer('position');
$table->string('url', 255);
$table->smallInteger('position');
$table->foreignId('admission_id')->constrained('admissions');
$table->timestamps();
});

View File

@ -10,10 +10,10 @@ return new class extends Migration
{
Schema::create('educational_institutions', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('slug');
$table->string('name', 255)->unique();
$table->string('slug', 255)->unique();
$table->text('description')->nullable();
$table->integer('position');
$table->smallInteger('position');
$table->timestamps();
});
}

View File

@ -10,10 +10,10 @@ return new class extends Migration
{
Schema::create('faculties', function (Blueprint $table) {
$table->id();
$table->string('name')->unique();
$table->string('name', 255)->unique();
$table->text('description')->nullable();
$table->integer('position');
$table->string('slug')->unique();
$table->smallInteger('position');
$table->string('slug', 255)->unique();
$table->foreignId('educational_institution_id')->constrained('educational_institutions');
$table->timestamps();
});

View File

@ -10,10 +10,10 @@ return new class extends Migration
{
Schema::create('departments', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('name', 255)->unique();
$table->text('description')->nullable();
$table->integer('position');
$table->string('slug');
$table->smallInteger('position');
$table->string('slug', 255)->unique();
$table->foreignId('faculty_id')->constrained('faculties');
$table->timestamps();
});

View File

@ -10,9 +10,9 @@ return new class extends Migration
{
Schema::create('education_forms', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('name', 255)->unique();
$table->text('description')->nullable();
$table->string('slug');
$table->string('slug', 255)->unique();
$table->timestamps();
});
}

View File

@ -10,9 +10,9 @@ return new class extends Migration
{
Schema::create('education_levels', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('name', 255)->unique();
$table->text('description')->nullable();
$table->string('slug');
$table->string('slug', 255)->unique();
$table->timestamps();
});
}

View File

@ -10,19 +10,19 @@ return new class extends Migration
{
Schema::create('directions', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('full_name');
$table->string('name', 255)->unique();
$table->string('full_name', 255);
$table->text('description')->nullable();
$table->string('code');
$table->integer('position');
$table->string('slug');
$table->string('code', 255);
$table->smallInteger('position');
$table->string('slug', 255)->unique();
$table->foreignId('department_id')->constrained('departments');
$table->foreignId('education_level_id')->constrained('education_levels');
$table->foreignId('education_form_id')->constrained('education_forms');
$table->integer('budget_places');
$table->integer('quota');
$table->integer('paid_places');
$table->integer('cost_paid_place');
$table->smallInteger('budget_places');
$table->smallInteger('quota');
$table->smallInteger('paid_places');
$table->smallInteger('cost_paid_place');
$table->float('period');
$table->timestamps();
});

View File

@ -10,10 +10,10 @@ return new class extends Migration
{
Schema::create('examination_types', function (Blueprint $table) {
$table->id();
$table->integer('position');
$table->string('name');
$table->smallInteger('position');
$table->string('name', 255)->unique();
$table->text('description')->nullable();
$table->string('slug');
$table->string('slug', 255)->unique();
$table->timestamps();
});
}

View File

@ -10,10 +10,10 @@ return new class extends Migration
{
Schema::create('subject_types', function (Blueprint $table) {
$table->id();
$table->integer('position');
$table->string('name');
$table->smallInteger('position');
$table->string('name', 255)->unique();
$table->text('description')->nullable();
$table->string('slug');
$table->string('slug', 255)->unique();
$table->timestamps();
});
}

View File

@ -13,10 +13,10 @@ return new class extends Migration
{
Schema::create('subjects', function (Blueprint $table) {
$table->id();
$table->integer('position');
$table->string('name');
$table->smallInteger('position');
$table->string('name', 255)->unique();
$table->text('description')->nullable();
$table->string('slug');
$table->string('slug', 255)->unique();
$table->timestamps();
});
}

View File

@ -13,8 +13,8 @@ return new class extends Migration
$table->foreignId('examination_type_id')->constrained('examination_types');
$table->foreignId('direction_id')->constrained('directions');
$table->foreignId('subject_id')->constrained('subjects');
$table->integer('scores');
$table->integer('position');
$table->tinyInteger('scores');
$table->smallInteger('position');
$table->foreignId('subject_type_id')->constrained('subject_types');
$table->timestamps();
});

View File

@ -13,10 +13,10 @@ return new class extends Migration
{
Schema::create('direction_profiles', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('name', 255)->unique();
$table->text('description')->nullable();
$table->string('slug');
$table->string('position');
$table->string('slug', 255)->unique();
$table->smallInteger('position');
$table->timestamps();
});
}

View File

@ -33,5 +33,46 @@ return [
'subject_type_id' => 'Поле "Тип Предмета" указывает на привязку вступительного испытания к типу предмету',
'scores' => 'Поле "Кол-во баллов" указывает на привязку вступительного испытания к Кол-ву баллов',
'position' => 'Поле "Позиция" нужно для упорядочивания отображения на сайте',
'direction_id' => 'Поле "Направление подготовки" указывает на привязку вступительного испытания к направлению подготовки',
],
'educational_institutions' => [
'position' => 'Поле "Позиция" нужно для упорядочивания отображения на сайте',
'name' => 'Поле "Название" должно быть уникальным для отображения на сайте',
'description' => 'Поле "Описание" может быть пустым для отображения на сайте',
'slug' => 'Поле "URL" нужно для отображения в браузере'
],
'direction_profiles' => [
'position' => 'Поле "Позиция" нужно для упорядочивания отображения на сайте',
'name' => 'Поле "Название" должно быть уникальным для отображения на сайте',
'description' => 'Поле "Описание" может быть пустым для отображения на сайте',
'slug' => 'Поле "URL" нужно для отображения в браузере'
],
'subject_types' => [
'position' => 'Поле "Позиция" нужно для упорядочивания отображения на сайте',
'name' => 'Поле "Название" должно быть уникальным для отображения на сайте',
'description' => 'Поле "Описание" может быть пустым для отображения на сайте',
'slug' => 'Поле "URL" нужно для отображения в браузере'
],
'subjects' => [
'position' => 'Поле "Позиция" нужно для упорядочивания отображения на сайте',
'name' => 'Поле "Название" должно быть уникальным для отображения на сайте',
'description' => 'Поле "Описание" может быть пустым для отображения на сайте',
'slug' => 'Поле "URL" нужно для отображения в браузере'
],
'examination_types' => [
'position' => 'Поле "Позиция" нужно для упорядочивания отображения на сайте',
'name' => 'Поле "Название" должно быть уникальным для отображения на сайте',
'description' => 'Поле "Описание" может быть пустым для отображения на сайте',
'slug' => 'Поле "URL" нужно для отображения в браузере'
],
'education_levels' => [
'name' => 'Поле "Название" должно быть уникальным для отображения на сайте',
'description' => 'Поле "Описание" может быть пустым для отображения на сайте',
'slug' => 'Поле "URL" нужно для отображения в браузере'
],
'education_forms' => [
'name' => 'Поле "Название" должно быть уникальным для отображения на сайте',
'description' => 'Поле "Описание" может быть пустым для отображения на сайте',
'slug' => 'Поле "URL" нужно для отображения в браузере'
],
];

View File

@ -1,59 +1,68 @@
@php use App\Helpers\PositionHelper; @endphp
@extends('layouts.admin_layout')
@section('content')
@auth()
<div class="row">
<div class="col">
<h1 class=""> Создать Профиль Подготовки</h1>
{{ Form::open(['url' => route('direction_profiles.store'), 'method' => 'POST', 'class' => '']) }}
{{ Form::open(['url' => route('direction_profiles.store'), 'method' => 'POST', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('name', 'Название') }}
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.position')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', '', ['class' => 'form-control']) }}
{{ Form::text('position', PositionHelper::directionProfile(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.position'), 'required']) }}
<div class="invalid-feedback">
Поле "Позиция" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.name')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.name'), 'required']) }}
<div class="invalid-feedback">
Поле "Название" обязательно!
</div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание') }}
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.description')]) }}
</div>
<div class="mt-1">
{{ Form::text('description', '', ['class' => 'form-control']) }}
{{ Form::text('description', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.description')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.slug')]) }}
</div>
<div class="mt-1">
{{ Form::text('slug', '', ['class' => 'form-control']) }}
{{ Form::text('slug', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.slug')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('slug') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-1">
{{ Form::text('position', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::submit('Создать', ['class' => 'btn btn-primary']) }}
</div>

View File

@ -4,56 +4,65 @@
<div class="row">
<div class="col">
<h1 class="">Изменить Профиль Подготовки</h1>
{{ Form::open(['url' => route('direction_profiles.update', $directionProfile), 'method' => 'PATCH', 'class' => '']) }}
{{ Form::open(['url' => route('direction_profiles.update', $directionProfile), 'method' => 'PATCH', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('name', 'Название') }}
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.position')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', $directionProfile->name, ['class' => 'form-control']) }}
{{ Form::text('position', $directionProfile->position, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.position'), 'required']) }}
<div class="invalid-feedback">
Поле "Позиция" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.name')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', $directionProfile->name, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.name'), 'required']) }}
<div class="invalid-feedback">
Поле "Название" обязательно!
</div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание') }}
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.description')]) }}
</div>
<div class="mt-1">
{{ Form::text('description', $directionProfile->description, ['class' => 'form-control']) }}
{{ Form::text('description', $directionProfile->description, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.description')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.slug')]) }}
</div>
<div class="mt-1">
{{ Form::text('slug', $directionProfile->slug, ['class' => 'form-control']) }}
{{ Form::text('slug', $directionProfile->slug, ['class' => 'form-control','data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.slug')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('slug') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-1">
{{ Form::text('position', $directionProfile->position, ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::submit('Изменить', ['class' => 'btn btn-primary']) }}
</div>

View File

@ -4,39 +4,43 @@
<div class="row">
<div class="col">
<h1 class=""> Создать форму Образования</h1>
{{ Form::open(['url' => route('education_forms.store'), 'method' => 'POST', 'class' => '']) }}
{{ Form::open(['url' => route('education_forms.store'), 'method' => 'POST', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('name', 'Название') }}
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.education_forms.position')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', '', ['class' => 'form-control']) }}
{{ Form::text('name', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.education_forms.name'), 'required']) }}
<div class="invalid-feedback">
Поле "Название" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание') }}
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.education_forms.description')]) }}
</div>
<div class="mt-1">
{{ Form::text('description', '', ['class' => 'form-control']) }}
{{ Form::text('description', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.education_forms.description')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.slug')]) }}
</div>
<div class="mt-1">
{{ Form::text('slug', '', ['class' => 'form-control']) }}
{{ Form::text('slug', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.slug')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('slug') }}
@endif

View File

@ -5,39 +5,43 @@
<div class="row">
<div class="col">
<h1 class="">Изменить форму образования</h1>
{{ Form::open(['url' => route('education_forms.update', $educationForm), 'method' => 'PATCH', 'class' => '']) }}
{{ Form::open(['url' => route('education_forms.update', $educationForm), 'method' => 'PATCH', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('name', 'Название') }}
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.education_forms.name')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', $educationForm->name, ['class' => 'form-control']) }}
{{ Form::text('name', $educationForm->name, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.education_forms.name'), 'required']) }}
<div class="invalid-feedback">
Поле "Название" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание') }}
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.education_forms.description')]) }}
</div>
<div class="mt-1">
{{ Form::text('description', $educationForm->description, ['class' => 'form-control']) }}
{{ Form::text('description', $educationForm->description, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.education_forms.description')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.slug')]) }}
</div>
<div class="mt-1">
{{ Form::text('slug', $educationForm->slug, ['class' => 'form-control']) }}
{{ Form::text('slug', $educationForm->slug, ['class' => 'form-control','data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.slug')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('slug') }}
@endif

View File

@ -4,39 +4,43 @@
<div class="row">
<div class="col">
<h1 class=""> Создать Уровень Образования</h1>
{{ Form::open(['url' => route('education_levels.store'), 'method' => 'POST', 'class' => '']) }}
{{ Form::open(['url' => route('education_levels.store'), 'method' => 'POST', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('name', 'Название') }}
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.education_levels.name')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', '', ['class' => 'form-control']) }}
{{ Form::text('name', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.education_levels.name'), 'required']) }}
<div class="invalid-feedback">
Поле "Название" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание') }}
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.education_levels.description')]) }}
</div>
<div class="mt-1">
{{ Form::text('description', '', ['class' => 'form-control']) }}
{{ Form::text('description', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.education_levels.description')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.education_levels.slug')]) }}
</div>
<div class="mt-1">
{{ Form::text('slug', '', ['class' => 'form-control']) }}
{{ Form::text('slug', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.education_levels.slug')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('slug') }}
@endif

View File

@ -5,39 +5,43 @@
<div class="row">
<div class="col">
<h1 class="">Езменить уровень образования</h1>
{{ Form::open(['url' => route('education_levels.update', $educationLevel), 'method' => 'PATCH', 'class' => '']) }}
{{ Form::open(['url' => route('education_levels.update', $educationLevel), 'method' => 'PATCH', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('name', 'Название') }}
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.name')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', $educationLevel->name, ['class' => 'form-control']) }}
<div class="invalid-feedback">
Поле "Название" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание') }}
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.description')]) }}
</div>
<div class="mt-1">
{{ Form::text('description', $educationLevel->description, ['class' => 'form-control']) }}
{{ Form::text('description', $educationLevel->description, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.description')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.slug')]) }}
</div>
<div class="mt-1">
{{ Form::text('slug', $educationLevel->slug, ['class' => 'form-control']) }}
{{ Form::text('slug', $educationLevel->slug, ['class' => 'form-control','data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.slug')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('slug') }}
@endif

View File

@ -1,54 +1,88 @@
@php use App\Helpers\PositionHelper; @endphp
@extends('layouts.admin_layout')
@section('content')
@auth()
<div class="row">
<div class="col">
<h1 class=""> Создать вступительный экзамен</h1>
{{ Form::open(['url' => route('entrance_examinations.store'), 'method' => 'POST', 'class' => '']) }}
{{ Form::open(['url' => route('entrance_examinations.store'), 'method' => 'POST', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('direction_id', 'Направление подготовки') }}
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.direction_id')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::select('direction_id', $directions, null, ['class' => 'form-select']) }}
{{ Form::text('position', PositionHelper::entranceExamination(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.direction_id'), 'required']) }}
<div class="invalid-feedback">
Поле "Позиция" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('direction_id', 'Направление подготовки', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.direction_id')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::select('direction_id', $directions, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.direction_id'), 'required']) }}
<div class="invalid-feedback">
Поле "Направление подготовки" обязательно!
</div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('direction_id') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('examination_type_id', 'Тип экзамена') }}
{{ Form::label('examination_type_id', 'Тип экзамена', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.examination_type_id')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::select('examination_type_id', $examination_types, null, ['class' => 'form-select']) }}
{{ Form::select('examination_type_id', $examination_types, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.examination_type_id'), 'required']) }}
<div class="invalid-feedback">
Поле "Тип экзамена" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('examination_type_id') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('subject_id', 'Предмет') }}
{{ Form::label('subject_id', 'Предмет', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_id')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::select('subject_id', $subjects, null, ['class' => 'form-select']) }}
{{ Form::select('subject_id', $subjects, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_id'), 'required']) }}
<div class="invalid-feedback">
Поле "Предмет" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('subject_id') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('subject_type_id', 'Тип предмета') }}
{{ Form::label('subject_type_id', 'Тип предмета', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_type_id')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::select('subject_type_id', $subjectTypes, null, ['class' => 'form-select']) }}
{{ Form::select('subject_type_id', $subjectTypes, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_id'), 'required']) }}
<div class="invalid-feedback">
Поле "Тип предмета" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('subject_type_id') }}
@endif
@ -56,29 +90,21 @@
<div class="mt-3">
{{ Form::label('scores', 'Кол-во баллов') }}
{{ Form::label('scores', 'Кол-во баллов', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_type_id')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('scores', '', ['class' => 'form-control']) }}
{{ Form::number('scores', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_id'), 'required']) }}
<div class="invalid-feedback">
Поле "Кол-во баллов" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('scores') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-1">
{{ Form::text('position', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::submit('Создать', ['class' => 'btn btn-primary']) }}
</div>

View File

@ -6,49 +6,67 @@
<h1 class="">Изменить вступительный экзамен</h1>
{{ Form::open(['url' => route('entrance_examinations.update', $entranceExamination), 'method' => 'PATCH', 'class' => '']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('direction_id', 'Направление подготовки') }}
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.position')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::select('direction_id', $directions, $entranceExamination->direction->id, ['class' => 'form-select']) }}
{{ Form::text('position', $entranceExamination->position, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.position'), 'required']) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('direction_id', 'Направление подготовки', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.direction_id')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::select('direction_id', $directions, $entranceExamination->direction->id, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.direction_id'), 'required']) }}
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('direction_id') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('examination_type_id', 'Тип экзамена') }}
{{ Form::label('examination_type_id', 'Тип экзамена', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.examination_type_id')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::select('examination_type_id', $examination_types, $entranceExamination->examinationType->id, ['class' => 'form-select']) }}
{{ Form::select('examination_type_id', $examination_types, $entranceExamination->examinationType->id, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.examination_type_id'), 'required']) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('examination_type_id') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('subject_id', 'Предмет') }}
{{ Form::label('subject_id', 'Предмет', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_id')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::select('subject_id', $subjects, $entranceExamination->subject->id, ['class' => 'form-select']) }}
{{ Form::select('subject_id', $subjects, $entranceExamination->subject->id, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_id'), 'required']) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('subject_id') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('subject_type_id', 'Тип предмета') }}
{{ Form::label('subject_type_id', 'Тип предмета', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_type_id')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::select('subject_type_id', $subjectTypes, $entranceExamination->subjectType->id, ['class' => 'form-select']) }}
{{ Form::select('subject_type_id', $subjectTypes, $entranceExamination->subjectType->id, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_type_id'), 'required']) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('subject_type_id') }}
@endif
@ -56,29 +74,18 @@
<div class="mt-3">
{{ Form::label('scores', 'Кол-во баллов') }}
{{ Form::label('scores', 'Кол-во баллов', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.scores')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('scores', $entranceExamination->scores, ['class' => 'form-control']) }}
{{ Form::text('scores', $entranceExamination->scores, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.scores'), 'required']) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('scores') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-1">
{{ Form::text('position', $entranceExamination->position, ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::submit('Изменить', ['class' => 'btn btn-primary']) }}
</div>

View File

@ -1,59 +1,69 @@
@php use App\Helpers\PositionHelper; @endphp
@extends('layouts.admin_layout')
@section('content')
@auth()
<div class="row">
<div class="col">
<h1 class=""> Создать тип экзамена</h1>
{{ Form::open(['url' => route('examination_types.store'), 'method' => 'POST', 'class' => '']) }}
{{ Form::open(['url' => route('examination_types.store'), 'method' => 'POST', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('name', 'Название') }}
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.examination_types.position')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', '', ['class' => 'form-control']) }}
{{ Form::text('position', PositionHelper::examinationType(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.examination_types.position'), 'required']) }}
<div class="invalid-feedback">
Поле "Позиция" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.examination_types.name')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.examination_types.name'), 'required']) }}
<div class="invalid-feedback">
Поле "Название" обязательно!
</div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание') }}
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.examination_types.description')]) }}
</div>
<div class="mt-1">
{{ Form::text('description', '', ['class' => 'form-control']) }}
{{ Form::text('description', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.examination_types.description')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.examination_types.slug')]) }}
</div>
<div class="mt-1">
{{ Form::text('slug', '', ['class' => 'form-control']) }}
{{ Form::text('slug', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.examination_types.slug')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('slug') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-1">
{{ Form::text('position', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::submit('Создать', ['class' => 'btn btn-primary']) }}
</div>

View File

@ -5,56 +5,64 @@
<div class="row">
<div class="col">
<h1 class="">Изменить тип экзамена</h1>
{{ Form::open(['url' => route('examination_types.update', $examinationType), 'method' => 'PATCH', 'class' => '']) }}
{{ Form::open(['url' => route('examination_types.update', $examinationType), 'method' => 'PATCH', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('name', 'Название') }}
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.examination_types.position')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', $examinationType->name, ['class' => 'form-control']) }}
{{ Form::number('position', $examinationType->position, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.examination_types.position'), 'required']) }}
<div class="invalid-feedback">
Поле "Позиция" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.name')]) }}
</div>
<div class="mt-1">
{{ Form::text('name', $examinationType->name, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.examination_types.name'), 'required']) }}
<div class="invalid-feedback">
Поле "Название" обязательно!
</div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание') }}
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.examination_types.description')]) }}
</div>
<div class="mt-1">
{{ Form::text('description', $examinationType->description, ['class' => 'form-control']) }}
{{ Form::text('description', $examinationType->description, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.examination_types.description')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.examination_types.slug')]) }}
</div>
<div class="mt-1">
{{ Form::text('slug', $examinationType->slug, ['class' => 'form-control']) }}
{{ Form::text('slug', $examinationType->slug, ['class' => 'form-control','data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.examination_types.slug')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('slug') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-1">
{{ Form::text('position', $examinationType->position, ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::submit('Изменить', ['class' => 'btn btn-primary']) }}
</div>

View File

@ -1,59 +1,70 @@
@php use App\Helpers\PositionHelper; @endphp
@extends('layouts.admin_layout')
@section('content')
@auth()
<div class="row">
<div class="col">
<h1 class=""> Создать Предмет</h1>
{{ Form::open(['url' => route('subjects.store'), 'method' => 'POST', 'class' => '']) }}
{{ Form::open(['url' => route('subjects.store'), 'method' => 'POST', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('name', 'Название') }}
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.position')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', '', ['class' => 'form-control']) }}
{{ Form::number('position', PositionHelper::subject(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.position'), 'required']) }}
<div class="invalid-feedback">
Поле "Позиция" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.name')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.name'), 'required']) }}
<div class="invalid-feedback">
Поле "Название" обязательно!
</div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание') }}
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.description')]) }}
</div>
<div class="mt-1">
{{ Form::text('description', '', ['class' => 'form-control']) }}
{{ Form::text('description', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.description')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.slug')]) }}
</div>
<div class="mt-1">
{{ Form::text('slug', '', ['class' => 'form-control']) }}
{{ Form::text('slug', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.slug')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('slug') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-1">
{{ Form::text('position', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::submit('Создать', ['class' => 'btn btn-primary']) }}
</div>

View File

@ -5,56 +5,65 @@
<div class="row">
<div class="col">
<h1 class="">Изменить предмет</h1>
{{ Form::open(['url' => route('subjects.update', $subject), 'method' => 'PATCH', 'class' => '']) }}
{{ Form::open(['url' => route('subjects.update', $subject), 'method' => 'PATCH', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('name', 'Название') }}
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.position')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', $subject->name, ['class' => 'form-control']) }}
{{ Form::number('position', $subject->position, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.position'), 'required']) }}
<div class="invalid-feedback">
Поле "Позиция" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.name')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', $subject->name, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.name'), 'required']) }}
<div class="invalid-feedback">
Поле "Название" обязательно!
</div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание') }}
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.description')]) }}
</div>
<div class="mt-1">
{{ Form::text('description', $subject->description, ['class' => 'form-control']) }}
{{ Form::text('description', $subject->description, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.description')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.slug')]) }}
</div>
<div class="mt-1">
{{ Form::text('slug', $subject->slug, ['class' => 'form-control']) }}
{{ Form::text('slug', $subject->slug, ['class' => 'form-control','data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.slug')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('slug') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-1">
{{ Form::text('position', $subject->position, ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::submit('Изменить', ['class' => 'btn btn-primary']) }}
</div>

View File

@ -1,59 +1,69 @@
@php use App\Helpers\PositionHelper; @endphp
@extends('layouts.admin_layout')
@section('content')
@auth()
<div class="row">
<div class="col">
<h1 class=""> Создать Тип предмета</h1>
{{ Form::open(['url' => route('subject_types.store'), 'method' => 'POST', 'class' => '']) }}
{{ Form::open(['url' => route('subject_types.store'), 'method' => 'POST', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('name', 'Название') }}
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.position')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', '', ['class' => 'form-control']) }}
{{ Form::text('position', PositionHelper::subjectType(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.position'), 'required']) }}
<div class="invalid-feedback">
Поле "Позиция" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.name')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.name'), 'required']) }}
<div class="invalid-feedback">
Поле "Название" обязательно!
</div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание') }}
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.description')]) }}
</div>
<div class="mt-1">
{{ Form::text('description', '', ['class' => 'form-control']) }}
{{ Form::text('description', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.description')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.slug')]) }}
</div>
<div class="mt-1">
{{ Form::text('slug', '', ['class' => 'form-control']) }}
{{ Form::text('slug', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.slug')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('slug') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-1">
{{ Form::text('position', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::submit('Создать', ['class' => 'btn btn-primary']) }}
</div>

View File

@ -5,56 +5,65 @@
<div class="row">
<div class="col">
<h1 class="">Изменить тип предмета</h1>
{{ Form::open(['url' => route('subject_types.update', $subjectType), 'method' => 'PATCH', 'class' => '']) }}
{{ Form::open(['url' => route('subject_types.update', $subjectType), 'method' => 'PATCH', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('name', 'Название') }}
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.position')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', $subjectType->name, ['class' => 'form-control']) }}
{{ Form::text('position', $subjectType->position, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.position'), 'required']) }}
<div class="invalid-feedback">
Поле "Позиция" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.name')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', $subjectType->name, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.name'), 'required']) }}
<div class="invalid-feedback">
Поле "Название" обязательно!
</div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание') }}
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.description')]) }}
</div>
<div class="mt-1">
{{ Form::text('description', $subjectType->description, ['class' => 'form-control']) }}
{{ Form::text('description', $subjectType->description, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.description')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.slug')]) }}
</div>
<div class="mt-1">
{{ Form::text('slug', $subjectType->slug, ['class' => 'form-control']) }}
{{ Form::text('slug', $subjectType->slug, ['class' => 'form-control','data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subject_types.slug')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('slug') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-1">
{{ Form::text('position', $subjectType->position, ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div class="mt-3">
{{ Form::submit('Изменить', ['class' => 'btn btn-primary']) }}
</div>

View File

@ -1,53 +1,62 @@
@php use App\Helpers\PositionHelper; @endphp
@extends('layouts.admin_layout')
@section('content')
@auth()
<div class="row">
<div class="col">
<h1 class=""> Создать учебное заведение</h1>
{{ Form::open(['url' => route('educational_institutions.store'), 'method' => 'POST', 'class' => '']) }}
{{ Form::open(['url' => route('educational_institutions.store'), 'method' => 'POST', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div>
{{ Form::label('position', 'Позиция') }}
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.position')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-2">
{{ Form::text('position', '', ['class' => 'form-control']) }}
{{ Form::text('position', PositionHelper::educationalInstitution(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.position'), 'required']) }}
<div class="invalid-feedback">
Поле "Позиция" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div>
{{ Form::label('name', 'Название') }}
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.name')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-2">
{{ Form::text('name', '', ['class' => 'form-control']) }}
{{ Form::text('name', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.name'), 'required']) }}
<div class="invalid-feedback">
Поле "Название" обязательно!
</div>
<div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div>
{{ Form::label('description', 'Описание') }}
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.description')]) }}
</div>
<div class="mt-2">
{{ Form::text('description', '', ['class' => 'form-control']) }}
{{ Form::text('description', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.description')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL') }}
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.slug')]) }}
</div>
<div class="mt-1">
{{ Form::text('slug', '', ['class' => 'form-control']) }}
{{ Form::text('slug', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.educational_institutions.slug')]) }}
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('slug') }}
@endif

View File

@ -7,6 +7,7 @@
<h1 class=""> Редактировать факультет</h1>
{{ Form::open(['url' => route('faculties.update', $faculty), 'method' => 'PATCH', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.position')]) }}
<span class="text-danger">*</span>
@ -50,6 +51,7 @@
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('educational_institution_id', 'Учебное заведение', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.educational_institution_id')]) }}
<span class="text-danger">*</span>
@ -62,6 +64,7 @@
{{ $errors->first('educational_institution_id') }}
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.faculty.slug')]) }}
</div>

View File

@ -170,14 +170,14 @@
width: 40%;
}
/* width */
::-webkit-scrollbar {
.scroll-1::-webkit-scrollbar {
width: 15px;
transition: 0.3s;
background-image: linear-gradient(to right, rgb(38, 159, 239), 20%, rgb(2, 142, 229));
border-radius: 20px;
}
/* Track */
::-webkit-scrollbar-track {
.scroll-1::-webkit-scrollbar-track {
background: #bdbdbd;
@ -186,7 +186,7 @@
}
/* Handle */
::-webkit-scrollbar-thumb {
.scroll-1::-webkit-scrollbar-thumb {
height: 30px;
width: 8px;
@ -199,7 +199,7 @@
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
.scroll-1::-webkit-scrollbar-thumb:hover {
background-image: linear-gradient(to right, rgb(38, 159, 239), 20%, rgb(2, 142, 229));
transition: 0.3s;
}
@ -215,23 +215,12 @@
<!--YaBrowser-->
<header>
<div class="container-fluid " style="background-image: url({{ URL::to('img/front-page/bakalavr-special/fon1_blok.png') }}); background-repeat: no-repeat; background-attachment: fixed;">
<?php $browser = $_SERVER['HTTP_USER_AGENT']; ?>
<?php if (strstr($browser, "YaBrowser")) { ?>
<div class=" d-none d-xl-flex justify-content-end align-items-end position-absolute float-end z-1 " style="height: 100%; bottom: 35px;" >
<div class="container-fluid position-relative " style="background-image: url({{ URL::to('img/front-page/bakalavr-special/fon1_blok.png') }}); background-repeat: no-repeat; background-attachment: fixed;">
<div class=" d-none d-xl-flex justify-content-end align-items-end position-absolute float-end z-1 " style="height: 100%; " >
<div style="width: 60%">
<img class="img-fluid float-end " src="{{ URL::to('img/front-page/bakalavr-special/professor.png') }}" alt="">
</div>
</div>
<?php }else{ ?>
<div class=" d-none d-xl-flex justify-content-end align-items-end position-absolute float-end z-1 " style="height: 100%; bottom: -10px;" >
<div style="width: 60%">
<img class="img-fluid float-end " src="{{ URL::to('img/front-page/bakalavr-special/professor.png') }}" alt="">
</div>
</div>
<?php } ?>
<div class="ms-0 ms-md-5 ">
<div class="row">
<div class="col-lg-3 col-12 d-none d-xl-flex justify-content-start align-items-center">
@ -520,10 +509,10 @@
<div class="row">
<div class="col-6">
<div class="display-5 col-12 mb-3 text-center text-md-start gradient-text " style=" font-weight: 700; letter-spacing: 0em; ">
СРОКИ ПРИЕМА
ЭКРАН ПРИЕМА
</div>
</div>
<div class="col-5 d-block d-lg-flex justify-content-end">
<!--<div class="col-5 d-block d-lg-flex justify-content-end">
<div class="me-2 d-flex justify-content-center align-items-center ">
<a href="#" class="px-5 py-2 hover3 button1 " >
<div class="gradient-text">
@ -545,9 +534,9 @@
</div>
</a>
</div>
</div>
<div class="mt-3 d-flex justify-content-center ">
<div class="row w-75 h-75 ps-2" style=" overflow:auto;">
</div> -->
<div class="mt-3 d-flex justify-content-center scroll-1">
<div class="row w-75 h-75 ps-2 scroll-1" style=" overflow:auto;">
<div class="col-11 " >
<div class="row shadow-lg mt-3 bg-white" style=" border-radius: 20px;">
<div class="col-9 m-3">

View File

@ -0,0 +1,334 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="noindex, nofollow">
<title>Laravel log viewer</title>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.16/css/dataTables.bootstrap4.min.css">
<style>
body {
padding: 25px;
}
h1 {
font-size: 1.5em;
margin-top: 0;
}
#table-log {
font-size: 0.85rem;
}
.sidebar {
font-size: 0.85rem;
line-height: 1;
}
.btn {
font-size: 0.7rem;
}
.stack {
font-size: 0.85em;
}
.date {
min-width: 75px;
}
.text {
word-break: break-all;
}
a.llv-active {
z-index: 2;
background-color: #f5f5f5;
border-color: #777;
}
.list-group-item {
word-break: break-word;
}
.folder {
padding-top: 15px;
}
.div-scroll {
height: 80vh;
overflow: hidden auto;
}
.nowrap {
white-space: nowrap;
}
.list-group {
padding: 5px;
}
/**
* DARK MODE CSS
*/
body[data-theme="dark"] {
background-color: #151515;
color: #cccccc;
}
[data-theme="dark"] a {
color: #4da3ff;
}
[data-theme="dark"] a:hover {
color: #a8d2ff;
}
[data-theme="dark"] .list-group-item {
background-color: #1d1d1d;
border-color: #444;
}
[data-theme="dark"] a.llv-active {
background-color: #0468d2;
border-color: rgba(255, 255, 255, 0.125);
color: #ffffff;
}
[data-theme="dark"] a.list-group-item:focus, [data-theme="dark"] a.list-group-item:hover {
background-color: #273a4e;
border-color: rgba(255, 255, 255, 0.125);
color: #ffffff;
}
[data-theme="dark"] .table td, [data-theme="dark"] .table th,[data-theme="dark"] .table thead th {
border-color:#616161;
}
[data-theme="dark"] .page-item.disabled .page-link {
color: #8a8a8a;
background-color: #151515;
border-color: #5a5a5a;
}
[data-theme="dark"] .page-link {
background-color: #151515;
border-color: #5a5a5a;
}
[data-theme="dark"] .page-item.active .page-link {
color: #fff;
background-color: #0568d2;
border-color: #007bff;
}
[data-theme="dark"] .page-link:hover {
color: #ffffff;
background-color: #0051a9;
border-color: #0568d2;
}
[data-theme="dark"] .form-control {
border: 1px solid #464646;
background-color: #151515;
color: #bfbfbf;
}
[data-theme="dark"] .form-control:focus {
color: #bfbfbf;
background-color: #212121;
border-color: #4a4a4a;
}
</style>
<script>
function initTheme() {
const darkThemeSelected =
localStorage.getItem('darkSwitch') !== null &&
localStorage.getItem('darkSwitch') === 'dark';
darkSwitch.checked = darkThemeSelected;
darkThemeSelected ? document.body.setAttribute('data-theme', 'dark') :
document.body.removeAttribute('data-theme');
}
function resetTheme() {
if (darkSwitch.checked) {
document.body.setAttribute('data-theme', 'dark');
localStorage.setItem('darkSwitch', 'dark');
} else {
document.body.removeAttribute('data-theme');
localStorage.removeItem('darkSwitch');
}
}
</script>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col sidebar mb-3">
<h1><i class="fa fa-calendar" aria-hidden="true"></i> Laravel Log Viewer</h1>
<p class="text-muted"><i>by Rap2h</i></p>
<p><a href="https://jsonbeautify.com/" target="_blank">Сайт для отображения данных</a></p>
<div class="custom-control custom-switch" style="padding-bottom:20px;">
<input type="checkbox" class="custom-control-input" id="darkSwitch">
<label class="custom-control-label" for="darkSwitch" style="margin-top: 6px;">Dark Mode</label>
</div>
<div class="list-group div-scroll">
@foreach($folders as $folder)
<div class="list-group-item">
<?php
\Rap2hpoutre\LaravelLogViewer\LaravelLogViewer::DirectoryTreeStructure( $storage_path, $structure );
?>
</div>
@endforeach
@foreach($files as $file)
<a href="?l={{ \Illuminate\Support\Facades\Crypt::encrypt($file) }}"
class="list-group-item @if ($current_file == $file) llv-active @endif">
{{$file}}
</a>
@endforeach
</div>
</div>
<div class="col-10 table-container">
@if ($logs === null)
<div>
Log file >50M, please download it.
</div>
@else
<table id="table-log" class="table table-striped" data-ordering-index="{{ $standardFormat ? 2 : 0 }}">
<thead>
<tr>
@if ($standardFormat)
<th>Level</th>
<th>Context</th>
<th>Date</th>
@else
<th>Line number</th>
@endif
<th>Content</th>
</tr>
</thead>
<tbody>
@foreach($logs as $key => $log)
<tr data-display="stack{{{$key}}}">
@if ($standardFormat)
<td class="nowrap text-{{{$log['level_class']}}}">
<span class="fa fa-{{{$log['level_img']}}}" aria-hidden="true"></span>&nbsp;&nbsp;{{$log['level']}}
</td>
<td class="text">{{$log['context']}}</td>
@endif
<td class="date">{{{$log['date']}}}</td>
<td class="text">
@if ($log['stack'])
<button type="button"
class="float-right expand btn btn-outline-dark btn-sm mb-2 ml-2"
data-display="stack{{{$key}}}">
<span class="fa fa-search"></span>
</button>
@endif
{{{$log['text']}}}
@if (isset($log['in_file']))
<br/>{{{$log['in_file']}}}
@endif
@if ($log['stack'])
<div class="stack" id="stack{{{$key}}}"
style="display: none; white-space: pre-wrap;">{{{ trim($log['stack']) }}}
</div>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
@endif
{{-- <div class="p-3">--}}
{{-- @if($current_file)--}}
{{-- <a href="?dl={{ \Illuminate\Support\Facades\Crypt::encrypt($current_file) }}{{ ($current_folder) ? '&f=' . \Illuminate\Support\Facades\Crypt::encrypt($current_folder) : '' }}">--}}
{{-- <span class="fa fa-download"></span> Download file--}}
{{-- </a>--}}
{{-- ---}}
{{-- <a id="clean-log" href="?clean={{ \Illuminate\Support\Facades\Crypt::encrypt($current_file) }}{{ ($current_folder) ? '&f=' . \Illuminate\Support\Facades\Crypt::encrypt($current_folder) : '' }}">--}}
{{-- <span class="fa fa-sync"></span> Clean file--}}
{{-- </a>--}}
{{-- ---}}
{{-- <a id="delete-log" href="?del={{ \Illuminate\Support\Facades\Crypt::encrypt($current_file) }}{{ ($current_folder) ? '&f=' . \Illuminate\Support\Facades\Crypt::encrypt($current_folder) : '' }}">--}}
{{-- <span class="fa fa-trash"></span> Delete file--}}
{{-- </a>--}}
{{-- @if(count($files) > 1)--}}
{{-- ---}}
{{-- <a id="delete-all-log" href="?delall=true{{ ($current_folder) ? '&f=' . \Illuminate\Support\Facades\Crypt::encrypt($current_folder) : '' }}">--}}
{{-- <span class="fa fa-trash-alt"></span> Delete all files--}}
{{-- </a>--}}
{{-- @endif--}}
{{-- @endif--}}
{{-- </div>--}}
</div>
</div>
</div>
<!-- jQuery for Bootstrap -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
<!-- FontAwesome -->
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
<!-- Datatables -->
<script type="text/javascript" src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.16/js/dataTables.bootstrap4.min.js"></script>
<script>
// dark mode by https://github.com/coliff/dark-mode-switch
const darkSwitch = document.getElementById('darkSwitch');
// this is here so we can get the body dark mode before the page displays
// otherwise the page will be white for a second...
initTheme();
window.addEventListener('load', () => {
if (darkSwitch) {
initTheme();
darkSwitch.addEventListener('change', () => {
resetTheme();
});
}
});
// end darkmode js
$(document).ready(function () {
$('.table-container tr').on('click', function () {
$('#' + $(this).data('display')).toggle();
});
$('#table-log').DataTable({
"order": [$('#table-log').data('orderingIndex'), 'desc'],
"stateSave": true,
"stateSaveCallback": function (settings, data) {
window.localStorage.setItem("datatable", JSON.stringify(data));
},
"stateLoadCallback": function (settings) {
var data = JSON.parse(window.localStorage.getItem("datatable"));
if (data) data.start = 0;
return data;
}
});
$('#delete-log, #clean-log, #delete-all-log').click(function () {
return confirm('Are you sure?');
});
});
</script>
</body>
</html>

View File

@ -14,8 +14,11 @@ use App\Http\Controllers\admin\Catalog\EducationalInstitutionController;
use App\Http\Controllers\admin\Catalog\FacultyController;
use App\Http\Controllers\admin\DocumentController;
use App\Http\Controllers\admin\UserController;
use Rap2hpoutre\LaravelLogViewer\LogViewerController;
Route::middleware(['auth', 'verified'])->prefix('admin')->group(function () {
Route::get('/logs', [LogViewerController::class, 'index']);
Route::get('/dashboard', function () {
return view('admin');
})->name('dashboard');

View File

@ -13,11 +13,8 @@ Route::get('/magistr', function () {
})->name('magistr');
Route::get('/home', [PageController::class, 'directions'])->name('home');
Route::get('/', [PageController::class, 'directions'])->name('bakalavr-special');
Route::get('/', function () {
$faculties = Faculty::all();
return view('new-design.bakalavr-special', compact('faculties'));
})->name('bakalavr-special');