highlight sidebar menu when viewing entity in client portal
This commit is contained in:
parent
55fec84e1d
commit
a746384976
1 changed files with 9 additions and 0 deletions
|
|
@ -24,6 +24,9 @@ use Illuminate\View\View;
|
|||
function isActive($page, bool $boolean = false)
|
||||
{
|
||||
$current_page = Route::currentRouteName();
|
||||
$action = Route::currentRouteAction(); // string
|
||||
|
||||
$show = str_replace(['.show','payment_methodss','documentss','subscriptionss'],['s.index','payment_methods','documents','subscriptions'], $current_page);
|
||||
|
||||
if ($page == $current_page && $boolean) {
|
||||
return true;
|
||||
|
|
@ -33,6 +36,12 @@ function isActive($page, bool $boolean = false)
|
|||
return 'bg-gray-200';
|
||||
}
|
||||
|
||||
if(($page == $show) && $boolean){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue