Skip to content

Commit

Permalink
close #1444 Fixed: Apps All Categories not working
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed May 17, 2020
1 parent 2ef5502 commit 92288eb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/Http/ViewComposers/Modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public function compose(View $view)
if (setting('apps.api_key')) {
$categories = Cache::remember('modules.categories.' . language()->getShortCode(), Date::now()->addHour(6), function () {
return collect($this->getCategories())->pluck('name', 'slug')
->prepend(trans('general.all_type', ['type' => trans_choice('general.categories', 2)]), '');
->prepend(trans('general.all_type', ['type' => trans_choice('general.categories', 2)]), '*');
});
} else {
$categories = collect([
'' => trans('general.all_type', ['type' => trans_choice('general.categories', 2)]),
'*' => trans('general.all_type', ['type' => trans_choice('general.categories', 2)]),
]);
}

Expand Down
2 changes: 1 addition & 1 deletion resources/assets/js/views/modules/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const app = new Vue({
onChangeCategory(category) {
let path = document.getElementById('category_page').value;

if (category) {
if (category != '*') {
path += '/' + encodeURIComponent(category);
} else {
path = app_home;
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/js/views/modules/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const app = new Vue({
onChangeCategory(category) {
let path = document.getElementById('category_page').value;

if (category) {
if (category != '*') {
path += '/' + encodeURIComponent(category);
} else {
path = app_home;
Expand Down
2 changes: 1 addition & 1 deletion resources/views/partials/modules/head.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<script type="text/javascript"><!--
var url = '{{ url("/") }}';
var app_home = '{{ url("apps/categories") }}';
var app_home = '{{ route("apps.home") }}';
var app_url = '{{ config("app.url") }}';
//--></script>

Expand Down

0 comments on commit 92288eb

Please sign in to comment.