Class LaravelUi5\Core\Attributes\Parameter

Declarative runtime parameter definition for Parameterizable classes.

Apply this attribute multiple times on a class (Ui5Action, Resource/Data provider, Report provider) to describe each expected request parameter. A central ParameterResolver will:

  • read all #[Parameter(...)] attributes,
  • extract raw values from the request (path/query/body),
  • cast them according to ParameterType,
  • resolve Eloquent models when type=Model,
  • enforce required/nullable/default semantics,
  • and return an immutable, normalized argument bag.

Key distinction: name vs. uriKey

  • name = logical backend name Used as array key in the resolved argument bag and as identifier in the application code (controller, handler, service).

  • uriKey = external transport key The concrete identifier used on the communication layer (path segment or query string key). This is what the client sends, and what is reflected into the manifest.

This separation allows:

  • Stable API contracts even if backend internals are refactored.
  • Aliasing: uriKey may differ from name (e.g. legacy URL key mapped to a cleaner internal parameter name).
  • Explicit, enterprise-grade clarity in manifests and generated clients.

Path resolution

  • If you use a catch-all {uri} route, uriKey specifies the segment name.
  • The order of #[Parameter(...)] attributes in the source code defines the positional order of path parameters.

Example #[Parameter( name: 'projectModel', uriKey: 'project', type: ValueType::Model, source: ParameterSource::Path, model: Project::class ), Parameter( name: 'withPositions', uriKey: 'withPositions', type: ValueType::Bool, source: ParameterSource::Query, required: false, default: false ) ]

Methods
Properties