| 1: | <?php |
| 2: | |
| 3: | namespace LaravelUi5\Core\Controllers; |
| 4: | |
| 5: | use Illuminate\Contracts\View\Factory; |
| 6: | use Illuminate\Contracts\View\View; |
| 7: | use Illuminate\Foundation\Application; |
| 8: | use LaravelUi5\Core\Contracts\ExecutableInvokerInterface; |
| 9: | use LaravelUi5\Core\Contracts\Ui5ContextInterface; |
| 10: | use LaravelUi5\Core\Ui5\Contracts\Ui5ReportInterface; |
| 11: | |
| 12: | class ReportController |
| 13: | { |
| 14: | public function __invoke(Ui5ContextInterface $context, ExecutableInvokerInterface $invoker): Factory|View|Application |
| 15: | { |
| 16: | |
| 17: | $report = $context->artifact(); |
| 18: | |
| 19: | $data = $invoker->invoke( |
| 20: | $report->getProvider(), |
| 21: | 'provide' |
| 22: | ); |
| 23: | |
| 24: | return view($report->getReportView(), $data); |
| 25: | } |
| 26: | } |
| 27: | |