From 9c5682202e940366d9dea5a127767db394c5709a Mon Sep 17 00:00:00 2001 From: Nasir Khan Saikat Date: Thu, 17 Oct 2024 03:36:09 +0600 Subject: [PATCH 1/2] Public link in Backend Show page --- .../views/components/backend/section-header.blade.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/resources/views/components/backend/section-header.blade.php b/resources/views/components/backend/section-header.blade.php index daef24442..717d65009 100644 --- a/resources/views/components/backend/section-header.blade.php +++ b/resources/views/components/backend/section-header.blade.php @@ -84,6 +84,15 @@ class="ms-1" small="true" /> @elseif (Str::endsWith(Route::currentRouteName(), "show")) + @if (Route::has("frontend.$module_name.show")) + + @endif + @if (auth()->user()->can("edit_" . $module_name) && Route::has("backend." . $module_name . ".edit")) Date: Mon, 21 Oct 2024 10:46:42 +0600 Subject: [PATCH 2/2] backend button public and pubilc view added --- .../backend/buttons/public-view.blade.php | 10 ++++++++++ .../backend/buttons/public.blade.php | 20 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 resources/views/components/backend/buttons/public-view.blade.php create mode 100644 resources/views/components/backend/buttons/public.blade.php diff --git a/resources/views/components/backend/buttons/public-view.blade.php b/resources/views/components/backend/buttons/public-view.blade.php new file mode 100644 index 000000000..6947d5855 --- /dev/null +++ b/resources/views/components/backend/buttons/public-view.blade.php @@ -0,0 +1,10 @@ +@props(["href" => "", "small" => "true", "text" => "Public View"]) + + + {!! $text != "" ? " " . $text : "" !!} + {!! $slot != "" ? " " . $slot : "" !!} + diff --git a/resources/views/components/backend/buttons/public.blade.php b/resources/views/components/backend/buttons/public.blade.php new file mode 100644 index 000000000..9cdf14b91 --- /dev/null +++ b/resources/views/components/backend/buttons/public.blade.php @@ -0,0 +1,20 @@ +@props([ + "route" => "", + "icon" => "fa-solid fa-arrow-up-right-from-square", + "title", + "small" => "", + "class" => "", +]) + +@if ($route) + + + {!! $slot != "" ? " " . $slot : "" !!} + +@endif