sarga filters
This commit is contained in:
parent
5e77b0a005
commit
694634fbab
|
|
@ -37,8 +37,8 @@ return [
|
||||||
'options' => [
|
'options' => [
|
||||||
'cluster' => env('PUSHER_APP_CLUSTER'),
|
'cluster' => env('PUSHER_APP_CLUSTER'),
|
||||||
'encrypted' => true,
|
'encrypted' => true,
|
||||||
'host' => env('PUSHER_HOST', 'sarga.com.tm'),
|
'host' => env('PUSHER_HOST', '127.0.0.1'),
|
||||||
'port' => env('PUSHER_PORT', 443),
|
'port' => env('PUSHER_PORT', 4433),
|
||||||
'schema' => 'https',
|
'schema' => 'https',
|
||||||
'useTLS' => true,
|
'useTLS' => true,
|
||||||
'curl_options' => [
|
'curl_options' => [
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class Brands extends \Webkul\RestApi\Http\Controllers\V1\Shop\ResourceController
|
||||||
if ($sort = $request->input('sort')) {
|
if ($sort = $request->input('sort')) {
|
||||||
$query = $query->orderBy($sort, $request->input('order') ?? 'asc');
|
$query = $query->orderBy($sort, $request->input('order') ?? 'asc');
|
||||||
} else {
|
} else {
|
||||||
$query = $query->orderBy('id', 'asc');
|
$query = $query->orderBy('position', 'desc')->orderBy('name', 'asc');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $query;
|
return $query;
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ class Categories extends CategoryController
|
||||||
|
|
||||||
public function filters($id){
|
public function filters($id){
|
||||||
$category = $this->getRepositoryInstance()->with(['filterableAttributes','brands' => function ($q){
|
$category = $this->getRepositoryInstance()->with(['filterableAttributes','brands' => function ($q){
|
||||||
$q->take(20)->orderBy('id', 'asc');
|
$q->take(20)->orderBy('position', 'desc')->orderBy('name', 'asc');
|
||||||
} ])
|
} ])
|
||||||
->find($id);
|
->find($id);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,14 @@
|
||||||
|
import Echo from 'laravel-echo';
|
||||||
|
window.Pusher = require('pusher-js');
|
||||||
|
|
||||||
|
window.Echo = new Echo({
|
||||||
|
broadcaster: 'pusher',
|
||||||
|
key: '1',
|
||||||
|
cluster: 'mt1',
|
||||||
|
wsHost: window.location.hostname,
|
||||||
|
wsPort: 6001,
|
||||||
|
wssPort: 443
|
||||||
|
});
|
||||||
|
|
||||||
window._ = require('lodash');
|
window._ = require('lodash');
|
||||||
window.Popper = require('popper.js').default;
|
window.Popper = require('popper.js').default;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue