where(function (Builder $query): void { $query->whereNull('server_id'); }); } /** * Validation rules for allocation attributes, consumed by the requests that * accept them. * * @return NormalizedValidationRules */ public static function rules(): array { return [ 'node_id' => ['required', 'exists:nodes,id'], 'ip' => ['required', 'ip'], 'port' => ['required', 'numeric', 'between:1024,65535'], 'ip_alias' => ['nullable', 'string'], 'server_id' => ['nullable', 'exists:servers,id'], 'notes' => ['nullable', 'string', 'max:256'], ]; } }