cache responces achyklar

This commit is contained in:
merdan 2022-12-21 18:59:26 +05:00
parent 967ec8b048
commit 4bf148ca87
2 changed files with 5 additions and 1 deletions

View File

@ -66,7 +66,9 @@ class Brands extends \Webkul\RestApi\Http\Controllers\V1\Shop\ResourceController
return $query->orderBy($sort, $request->input('order') ?? 'asc');
}
return $query->withCount('flats')->having('flats_count', '>', 1);
return $query->withCount('flats')->having('flats_count', '>', 1)
->orderBy('position', 'desc')
->orderBy('name', 'asc');
});

View File

@ -1,6 +1,7 @@
<?php
namespace Sarga\Admin\Http\Controllers;
use Illuminate\Support\Facades\Log;
use Sarga\Admin\DataGrids\MenuDataGrid;
use Sarga\Admin\Http\Requests\MenuRequest;
use Sarga\Shop\Repositories\CategoryRepository;
@ -69,6 +70,7 @@ class Menus extends Controller
if (request()->ajax()) {
$results = [];
$queries = explode(' ', request()->input('query'));
Log::info($queries);
foreach ($repository->search($queries) as $row) {
$results[] = [
'id' => $row->id,