add controllers, servoices

This commit is contained in:
root
2026-03-09 02:52:13 -04:00
parent c8de5f7edc
commit d76c871cb7
501 changed files with 34439 additions and 21843 deletions
+23
View File
@@ -8,6 +8,29 @@ use Illuminate\Http\Exceptions\HttpResponseException;
abstract class ApiFormRequest extends FormRequest
{
public function validationData(): array
{
$json = json_decode($this->getContent() ?: '', true);
$json = is_array($json) ? $json : [];
return array_merge(
$this->query->all(),
$this->request->all(),
$this->json()->all(),
$json
);
}
protected function prepareForValidation(): void
{
$json = json_decode($this->getContent() ?: '', true);
if (is_array($json)) {
$this->merge($json);
} else {
$this->merge($this->json()->all());
}
}
protected function failedValidation(Validator $validator): void
{
throw new HttpResponseException(