diff --git a/src/Http/Controllers/Contracts/QuestionAnswerAdminApiContract.php b/src/Http/Controllers/Contracts/QuestionAnswerAdminApiContract.php index 0f2ed22..a35d842 100644 --- a/src/Http/Controllers/Contracts/QuestionAnswerAdminApiContract.php +++ b/src/Http/Controllers/Contracts/QuestionAnswerAdminApiContract.php @@ -30,6 +30,7 @@ interface QuestionAnswerAdminApiContract * @OA\Schema( * type="integer", * ), + * in="query", * required=false * ), * @OA\Parameter( @@ -38,6 +39,7 @@ interface QuestionAnswerAdminApiContract * @OA\Schema( * type="integer", * ), + * in="query", * required=false * ), * @OA\Response( diff --git a/src/Http/Requests/QuestionnaireAssignUnassignRequest.php b/src/Http/Requests/QuestionnaireAssignUnassignRequest.php index 1e8f528..6f360be 100644 --- a/src/Http/Requests/QuestionnaireAssignUnassignRequest.php +++ b/src/Http/Requests/QuestionnaireAssignUnassignRequest.php @@ -8,6 +8,7 @@ use Illuminate\Support\Facades\Gate; use Illuminate\Validation\Rule; use Illuminate\Foundation\Http\FormRequest; +use Illuminate\Validation\Rules\Exists; class QuestionnaireAssignUnassignRequest extends FormRequest { @@ -43,7 +44,7 @@ public function rules(): array ], 'model_id' => [ 'integer', - Rule::exists($this->getQuestionnaireModelType()->model_class, 'id'), + new Exists($this->getQuestionnaireModelType()->model_class, 'id'), ], ]; } diff --git a/src/Http/Requests/QuestionnaireFrontAnswerRequest.php b/src/Http/Requests/QuestionnaireFrontAnswerRequest.php index 6934d9e..302badf 100644 --- a/src/Http/Requests/QuestionnaireFrontAnswerRequest.php +++ b/src/Http/Requests/QuestionnaireFrontAnswerRequest.php @@ -8,6 +8,7 @@ use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Facades\Gate; use Illuminate\Validation\Rule; +use Illuminate\Validation\Rules\Exists; /** * @OA\Schema( @@ -71,7 +72,7 @@ public function rules(): array ], 'model_id' => [ 'integer', - Rule::exists($this->getQuestionnaireModelType()->model_class, 'id'), + new Exists($this->getQuestionnaireModelType()->model_class, 'id'), ], 'answers' => ['sometimes', 'array'], 'answers.*' => ['sometimes', 'array'], diff --git a/src/Http/Requests/QuestionnaireFrontReadRequest.php b/src/Http/Requests/QuestionnaireFrontReadRequest.php index 66216f7..c5a8989 100644 --- a/src/Http/Requests/QuestionnaireFrontReadRequest.php +++ b/src/Http/Requests/QuestionnaireFrontReadRequest.php @@ -8,6 +8,7 @@ use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Facades\Gate; use Illuminate\Validation\Rule; +use Illuminate\Validation\Rules\Exists; class QuestionnaireFrontReadRequest extends FormRequest { @@ -43,7 +44,7 @@ public function rules(): array ], 'model_id' => [ 'integer', - Rule::exists($this->getQuestionnaireModelType()->model_class, 'id'), + new Exists($this->getQuestionnaireModelType()->model_class, 'id'), ], ]; } diff --git a/src/Http/Requests/QuestionnaireStarsFrontRequest.php b/src/Http/Requests/QuestionnaireStarsFrontRequest.php index 5ac21ec..ef924c7 100644 --- a/src/Http/Requests/QuestionnaireStarsFrontRequest.php +++ b/src/Http/Requests/QuestionnaireStarsFrontRequest.php @@ -6,6 +6,7 @@ use EscolaLms\Questionnaire\Rules\ClassExist; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Rule; +use Illuminate\Validation\Rules\Exists; class QuestionnaireStarsFrontRequest extends FormRequest { @@ -33,7 +34,7 @@ public function rules(): array ], 'model_id' => [ 'integer', - Rule::exists($this->getQuestionnaireModelType()->model_class, 'id'), + new Exists($this->getQuestionnaireModelType()->model_class, 'id'), ], ]; }