Skip to content

Commit

Permalink
fix: fix fore noLocaleRoute
Browse files Browse the repository at this point in the history
  • Loading branch information
samberrry committed Jan 31, 2023
1 parent d6b923d commit aa746c0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions src/Controllers/BinshopsReaderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public function index($locale = null, Request $request, $category_slug = null)
'categories' => $rootList,
'posts' => $posts,
'title' => $title,
'noLocaleRoute' => $request->get("noLocaleRoute")
]);
}

Expand All @@ -110,13 +111,14 @@ public function search(Request $request)
BinshopsCategory::loadSiblingsWithList($rootList);

return view("binshopsblog::search", [
'lang_id' => $request->get('lang_id'),
'locale' => $request->get("locale"),
'categories' => $rootList,
'query' => $query,
'search_results' => $search_results]
'lang_id' => $request->get('lang_id'),
'locale' => $request->get("locale"),
'categories' => $rootList,
'query' => $query,
'search_results' => $search_results,
'noLocaleRoute' => $request->get("noLocaleRoute")
]
);

}

/**
Expand Down Expand Up @@ -167,8 +169,8 @@ public function viewSinglePost(Request $request)
->get(),
'captcha' => $captcha,
'categories' => $categories,
'locale' => $request->get("locale")
'locale' => $request->get("locale"),
'noLocaleRoute' => $request->get("noLocaleRoute")
]);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<ul class="navbar-nav ml-auto">
<!-- Authentication Links -->

<li class='nav-item px-2'><a class='nav-link' href='{{route("binshopsblog.index" , app('request')->get('locale'))}}'>Blog home</a></li>
<li class='nav-item px-2'><a class='nav-link' href='{{route("binshopsblog.index" , app('request')->get('locale'))}}' target="_blank">Blog home</a></li>

<li class="nav-item ">
<a id="" class="nav-link " href="#" role="button"
Expand Down

0 comments on commit aa746c0

Please sign in to comment.