Class LaravelUi5\Core\Controllers\CardController

extends Controller

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}.blade.php).
  • Resolve the associated {@see DataProviderInterface}.
  • If the provider implements {@see ParameterizableInterface}, inject validated request parameters.
  • If the provider implements {@see ConfigurableInterface}, inject resolved settings.
  • Execute the provider and render the manifest with the resulting data.
  • 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.
  • Illuminate\Routing\Controller
    • LaravelUi5\Core\Controllers\CardController
Methods