From 2c32dd86678b583655a933c5301b76a1fc754853 Mon Sep 17 00:00:00 2001 From: aslan Date: Tue, 12 Mar 2024 12:45:22 +0300 Subject: [PATCH] any fix direction profile --- .../Direction/UpdateDirectionProfileRequest.php | 14 ++++++++++++-- .../direction/direction_profile/create.blade.php | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/Http/Requests/admin/Catalog/Direction/UpdateDirectionProfileRequest.php b/app/Http/Requests/admin/Catalog/Direction/UpdateDirectionProfileRequest.php index b82413f..13b58dd 100644 --- a/app/Http/Requests/admin/Catalog/Direction/UpdateDirectionProfileRequest.php +++ b/app/Http/Requests/admin/Catalog/Direction/UpdateDirectionProfileRequest.php @@ -14,9 +14,19 @@ class UpdateDirectionProfileRequest extends FormRequest public function rules(): array { return [ - 'name' => ['required', 'string', 'max:255', "unique:direction_profiles,name,{$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}",], + 'slug' => [ + 'required', + 'string', + 'max:255', + "unique:direction_profiles,slug,{$this->direction_profile->id}" + ], 'position' => 'required|int|numeric|max:255', ]; } diff --git a/resources/views/admin/catalog/direction/direction_profile/create.blade.php b/resources/views/admin/catalog/direction/direction_profile/create.blade.php index c7e124c..ae5b44d 100644 --- a/resources/views/admin/catalog/direction/direction_profile/create.blade.php +++ b/resources/views/admin/catalog/direction/direction_profile/create.blade.php @@ -12,12 +12,12 @@ *
- {{ Form::text('position', PositionHelper::faculty(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.position'), 'required']) }} + {{ Form::text('position', PositionHelper::directionProfile(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.position'), 'required']) }}
Поле "Позиция" обязательно!
-
+
@if ($errors->any()) {{ $errors->first('position') }} @endif