From f45ca23cd54e7878dfeffbd72612a623c8ad1e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Mon, 30 Oct 2023 16:40:04 +0300 Subject: [PATCH] fixed delete button route issue --- app/View/Components/DeleteButton.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/View/Components/DeleteButton.php b/app/View/Components/DeleteButton.php index 867a9a2c3..3fc784436 100644 --- a/app/View/Components/DeleteButton.php +++ b/app/View/Components/DeleteButton.php @@ -240,7 +240,13 @@ class DeleteButton extends Component $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)) {