Class LaravelUi5\Core\Http\Controllers\CardController

extends Controller
uses ResolvesCardI18nBundle

Controller for serving UI5 Card manifests with embedded data.

This controller is invoked only for routes that resolve to UI5 Cards. The Ui5Context middleware guarantees that $context->artifact is an instance of {@see Ui5CardInterface}.

Responsibilities:

  • Locate the Blade-based card manifest by convention (ui5/{app}/resources/ui5/cards/{slug}/manifest.json.blade.php).
  • Resolve the associated {@see DataProviderInterface}.
  • Execute the provider and render the manifest with the resulting data.
  • When the card ships an i18n/ bundle, inject the card-relative sap.app/i18n pointer (see {@see CardI18nController}).
  • Return the compiled manifest as JSON to the client.

Notes:

  • Cards are read-only artifacts; providers must not mutate application state.
  • The manifest Blade file is expected to output valid JSON.
  • Missing manifests result in HTTP 404; execution always returns 200, even for empty data arrays.
Methods