close #1444 Fixed: Apps All Categories not working

This commit is contained in:
Cüneyt Şentürk 2020-05-17 03:15:26 +03:00
parent 2ef5502172
commit 92288eb60f
4 changed files with 5 additions and 5 deletions

View File

@ -22,11 +22,11 @@ class Modules
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)]),
]);
}

View File

@ -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;

View File

@ -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;

View File

@ -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>