Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

626 B
Raw Blame
<?php

namespace HiEvents\Enterprise\Sso\Http\Request;

use HiEvents\Http\Request\BaseRequest;

class UpdateSsoEnforcementRequest extends BaseRequest
{
    public function rules(): array
    {
        return [
            'enabled' => ['required', 'boolean'],
            'exempt_account_user_ids' => ['nullable', 'array', 'max:1000'],
            'exempt_account_user_ids.*' => ['integer'],
        ];
    }

    /**
     * @return int[]
     */
    public function exemptAccountUserIds(): array
    {
        return array_values(array_unique(array_map('intval', $this->validated('exempt_account_user_ids') ?? [])));
    }
}