diff --git a/config/scout.php b/config/scout.php index 3fa4c9964..f4a935fc5 100644 --- a/config/scout.php +++ b/config/scout.php @@ -124,7 +124,10 @@ return [ 'sortableAttributes' => ['name','created_at','min_price'], // Other settings fields... ], - + Sarga\Brand\Models\Brand::class => [ +// 'filterableAttributes'=> ['type' ], + 'sortableAttributes' => ['name','position'], + ] ], ], diff --git a/packages/Sarga/Brand/src/Models/Brand.php b/packages/Sarga/Brand/src/Models/Brand.php index 221386196..413093279 100644 --- a/packages/Sarga/Brand/src/Models/Brand.php +++ b/packages/Sarga/Brand/src/Models/Brand.php @@ -43,13 +43,15 @@ class Brand extends Model implements BrandContract return [ 'id' => $this->id, 'name' => $this->name, - 'type' => 'brand' + 'type' => 'brand', + 'position' => $this->position, + ]; } public function shouldBeSearchable() { - return true; + return $this->status; } /**