|
|
@@ -33,12 +33,11 @@ class ProviderRequest extends FormRequest
|
|
|
Rule::unique('providers', 'user_id')
|
|
|
->ignore($providerId)
|
|
|
->whereNull('deleted_at'),
|
|
|
- function ($attribute, $value, $fail) {
|
|
|
- // Verifica se o user já está vinculado a um client
|
|
|
- if (\DB::table('clients')->where('user_id', $value)->whereNull('deleted_at')->exists()) {
|
|
|
- $fail(__('validation.custom.user_id.already_linked_to_client'));
|
|
|
- }
|
|
|
- },
|
|
|
+ // function ($attribute, $value, $fail) {
|
|
|
+ // if (\DB::table('clients')->where('user_id', $value)->whereNull('deleted_at')->exists()) {
|
|
|
+ // $fail(__('validation.custom.user_id.already_linked_to_client'));
|
|
|
+ // }
|
|
|
+ // },
|
|
|
],
|
|
|
'average_rating' => 'sometimes|nullable|numeric|min:0|max:5',
|
|
|
'total_services' => 'sometimes|integer|min:0',
|
|
|
@@ -47,9 +46,9 @@ class ProviderRequest extends FormRequest
|
|
|
'document_verified' => 'sometimes|boolean',
|
|
|
'is_approved' => 'sometimes|boolean',
|
|
|
'daily_price_8h' => 'sometimes|nullable|numeric|min:100|max:500',
|
|
|
- 'daily_price_6h' => 'sometimes|nullable|numeric|min:100|max:500',
|
|
|
- 'daily_price_4h' => 'sometimes|nullable|numeric|min:100|max:500',
|
|
|
- 'daily_price_2h' => 'sometimes|nullable|numeric|min:100|max:500',
|
|
|
+ 'daily_price_6h' => 'sometimes|nullable|numeric',
|
|
|
+ 'daily_price_4h' => 'sometimes|nullable|numeric',
|
|
|
+ 'daily_price_2h' => 'sometimes|nullable|numeric',
|
|
|
'profile_media_id' => 'sometimes|nullable|exists:media,id',
|
|
|
];
|
|
|
|
|
|
@@ -69,12 +68,11 @@ class ProviderRequest extends FormRequest
|
|
|
'required',
|
|
|
'exists:users,id',
|
|
|
Rule::unique('providers', 'user_id')->whereNull('deleted_at'),
|
|
|
- function ($attribute, $value, $fail) {
|
|
|
- // Verifica se o user já está vinculado a um client
|
|
|
- if (\DB::table('clients')->where('user_id', $value)->whereNull('deleted_at')->exists()) {
|
|
|
- $fail(__('validation.custom.user_id.already_linked_to_client'));
|
|
|
- }
|
|
|
- },
|
|
|
+ // function ($attribute, $value, $fail) {
|
|
|
+ // if (\DB::table('clients')->where('user_id', $value)->whereNull('deleted_at')->exists()) {
|
|
|
+ // $fail(__('validation.custom.user_id.already_linked_to_client'));
|
|
|
+ // }
|
|
|
+ // },
|
|
|
];
|
|
|
}
|
|
|
|