From 8bcb173a922b7387543fb4069238e45d0c26aa2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Sun, 10 Jan 2021 22:04:22 +0300 Subject: [PATCH] Customize button route add alias for module --- app/Abstracts/View/Components/DocumentShow.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Abstracts/View/Components/DocumentShow.php b/app/Abstracts/View/Components/DocumentShow.php index 8da7e2dd0..cb7dfff54 100644 --- a/app/Abstracts/View/Components/DocumentShow.php +++ b/app/Abstracts/View/Components/DocumentShow.php @@ -761,7 +761,15 @@ abstract class DocumentShow extends Base return $routeButtonCustomize; } - $route = 'settings.' . $type . '.edit'; + $route = ''; + + $alias = config('type.' . $type . '.alias'); + + if (!empty($alias)) { + $route .= $alias . '.'; + } + + $route .= 'settings.' . $type . '.edit'; try { route($route);