25 lines
568 B
PHP
25 lines
568 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Server;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class ServerRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'name' => 'required|string|max:255',
|
|
'ip_address' => 'required|string|max:255',
|
|
'username' => 'required|string|max:255',
|
|
'password' => 'required|string|max:255',
|
|
'status' => 'nullable|string|in:activated,Stopped',
|
|
];
|
|
}
|
|
}
|