user()?->can('access-admin') ?? false; } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'user_ids' => ['nullable', 'array'], 'user_ids.*' => ['integer', 'distinct', Rule::exists('users', 'id')], ]; } }