mirror of
https://github.com/crivion/laranode.git
synced 2026-05-07 06:01:28 +08:00
32 lines
784 B
PHP
32 lines
784 B
PHP
<?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'],
|
|
];
|
|
}
|
|
}
|