search fix

This commit is contained in:
merdan 2023-09-15 14:42:39 +05:00
parent 1f58f19a76
commit adf9446fc3
2 changed files with 8 additions and 3 deletions

View File

@ -124,7 +124,10 @@ return [
'sortableAttributes' => ['name','created_at','min_price'], 'sortableAttributes' => ['name','created_at','min_price'],
// Other settings fields... // Other settings fields...
], ],
Sarga\Brand\Models\Brand::class => [
// 'filterableAttributes'=> ['type' ],
'sortableAttributes' => ['name','position'],
]
], ],
], ],

View File

@ -43,13 +43,15 @@ class Brand extends Model implements BrandContract
return [ return [
'id' => $this->id, 'id' => $this->id,
'name' => $this->name, 'name' => $this->name,
'type' => 'brand' 'type' => 'brand',
'position' => $this->position,
]; ];
} }
public function shouldBeSearchable() public function shouldBeSearchable()
{ {
return true; return $this->status;
} }
/** /**