Teren-app/app/Http/Requests/StoreSmsProfileRequest.php
Simon Pocrnjič 930ac83604 SMS service
2025-10-24 21:39:10 +02:00

24 lines
562 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreSmsProfileRequest extends FormRequest
{
public function authorize(): bool
{
return $this->user()?->can('manage-settings') ?? false;
}
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:190'],
'active' => ['sometimes', 'boolean'],
'api_username' => ['required', 'string', 'max:190'],
'api_password' => ['required', 'string', 'max:500'],
];
}
}