From fcc2463712d107d5f075bca44e5ba0f02470937b Mon Sep 17 00:00:00 2001 From: marco76tv Date: Mon, 5 Feb 2024 14:51:57 +0100 Subject: [PATCH] Throw exception if none of the views exist --- View/Components/Render/Block.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/View/Components/Render/Block.php b/View/Components/Render/Block.php index ec3053c5..5afd312c 100644 --- a/View/Components/Render/Block.php +++ b/View/Components/Render/Block.php @@ -38,7 +38,11 @@ public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vi */ $view = Arr::first($views, static fn (string $view) => view()->exists($view)); if (null === $view) { +<<<<<<< HEAD throw new \Exception('none of these views exists ['.implode(', '.chr(13), $views).']'); +======= + throw new Exception('none of these views exists ['.implode(', '.chr(13),$views).']'); +>>>>>>> 7339779 (up) } $view_params = $this->block['data'] ?? [];