diff --git a/app/View/Components/DeleteButton.php b/app/View/Components/DeleteButton.php index 867a9a2c30c..3fc7844365e 100644 --- a/app/View/Components/DeleteButton.php +++ b/app/View/Components/DeleteButton.php @@ -240,7 +240,13 @@ protected function getModelTitle() $page = ''; if (! empty($this->route)) { - $paths = explode('.', $this->route); + if (is_array($this->route)) { + $string = $this->route[0]; + } else { + $string = $this->route; + } + + $paths = explode('.', $string); $page = $paths[0]; } elseif (! empty($this->url)) {