mysql manager: refactoring to services & actions to keep my controller clean

This commit is contained in:
Crivion
2025-10-18 18:06:58 +03:00
parent 2e2745ca34
commit 17af7fed1f
12 changed files with 516 additions and 156 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UpdateDatabaseRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true; // Authorization handled by policy
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'id' => ['required', 'integer'],
'charset' => ['required', 'string'],
'collation' => ['required', 'string'],
'db_password' => ['nullable', 'string', 'min:8'],
];
}
}