From 43c5dbc9c04ab33d1c12b4fb414d5d8dacf63923 Mon Sep 17 00:00:00 2001 From: Pavel Mironchik Date: Sun, 3 Jan 2021 14:40:59 +0600 Subject: [PATCH] Use the provided value of the 'route-button-add-new' attribute in the document view. --- app/Abstracts/View/Components/DocumentShow.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Abstracts/View/Components/DocumentShow.php b/app/Abstracts/View/Components/DocumentShow.php index 0915fa5b5..66734686c 100644 --- a/app/Abstracts/View/Components/DocumentShow.php +++ b/app/Abstracts/View/Components/DocumentShow.php @@ -660,6 +660,10 @@ abstract class DocumentShow extends Component protected function getRouteButtonAddNew($type, $routeButtonAddNew) { + if (!empty($routeButtonAddNew)) { + return $routeButtonAddNew; + } + $page = Str::plural($type, 2); $route = $page . '.create';