This commit is contained in:
Meghdad committed 2026-08-24 19:44:24 +03:30
commit 8d5446f466
232 files changed
+25416

No files matched your search

@@ -0,0 +1,45 @@
<?php
namespace App\Http\Requests;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class ListBazaarReviewsRequest extends FormRequest
{
protected function prepareForValidation(): void
{
if ($this->has('is_replied')) {
$this->merge([
'is_replied' => filter_var($this->input('is_replied'), FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE),
]);
}
}
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'publish_date_after' => ['nullable', 'date'],
'publish_date_before' => ['nullable', 'date', 'after_or_equal:publish_date_after'],
'rate_min' => ['nullable', 'integer', 'between:1,5'],
'rate_max' => ['nullable', 'integer', 'between:1,5'],
'app_version_code' => ['nullable', 'integer', 'min:1'],
'sdk_version' => ['nullable', 'integer', 'min:1'],
'is_replied' => ['nullable', 'boolean'],
'cursor' => ['nullable', 'string', 'max:2048'],
];
}
}