1: <?php
2:
3: namespace LaravelUi5\Core\Controllers;
4:
5: use Illuminate\Http\Response;
6: use Illuminate\Support\Facades\Blade;
7: use LaravelUi5\Core\Contracts\Ui5ContextInterface;
8: use LaravelUi5\Core\Ui5\Contracts\Ui5DashboardInterface;
9:
10: class DashboardController
11: {
12: public function __invoke(Ui5ContextInterface $context, string $slug): Response
13: {
14: /** @var Ui5DashboardInterface $dashboard */
15: $dashboard = $context->artifact();
16:
17: $xml = Blade::render($dashboard->getDashboard());
18:
19: return response($xml, 200, [
20: 'Content-Type' => 'application/xml',
21: ]);
22: }
23: }
24: