2020-07-09 20:36:08 -07:00
|
|
|
<?php
|
|
|
|
|
|
2024-03-12 22:39:16 -04:00
|
|
|
namespace App\Http\Requests\Api\Client\Servers\Network;
|
2020-07-09 20:36:08 -07:00
|
|
|
|
2025-12-11 14:34:27 +01:00
|
|
|
use App\Enums\SubuserPermission;
|
2025-09-24 13:34:19 +02:00
|
|
|
use App\Http\Requests\Api\Client\ClientApiRequest;
|
2024-03-12 22:39:16 -04:00
|
|
|
use App\Models\Allocation;
|
2020-07-09 20:36:08 -07:00
|
|
|
|
|
|
|
|
class UpdateAllocationRequest extends ClientApiRequest
|
|
|
|
|
{
|
2025-12-11 14:34:27 +01:00
|
|
|
public function permission(): SubuserPermission
|
2020-07-09 20:36:08 -07:00
|
|
|
{
|
2025-12-11 14:34:27 +01:00
|
|
|
return SubuserPermission::AllocationUpdate;
|
2020-07-09 20:36:08 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function rules(): array
|
|
|
|
|
{
|
2020-07-10 21:17:28 -07:00
|
|
|
$rules = Allocation::getRules();
|
|
|
|
|
|
2020-07-09 20:36:08 -07:00
|
|
|
return [
|
2020-07-10 21:17:28 -07:00
|
|
|
'notes' => array_merge($rules['notes'], ['present']),
|
2020-07-09 20:36:08 -07:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|