search refactor3
This commit is contained in:
parent
c1cec78497
commit
724ef42e97
|
|
@ -49,10 +49,26 @@ class ProductFlat extends Model implements ProductFlatContract
|
||||||
{
|
{
|
||||||
return 'products_index';
|
return 'products_index';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function searchable(): bool
|
public function searchable(): bool
|
||||||
{
|
{
|
||||||
return $this->status || $this->visible_individually;
|
return $this->status || $this->visible_individually;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function toSearchableArray():array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'id' => $this->id,
|
||||||
|
'name' => $this->name,
|
||||||
|
'locale' => $this->locale,
|
||||||
|
'channel' => $this->channel,
|
||||||
|
'min_price' => $this->min_price,
|
||||||
|
'meta_keywords' => $this->meta_keywords,
|
||||||
|
'status' => $this->status,
|
||||||
|
'visible_individually'=> $this->visible_individually,
|
||||||
|
'product_id' => $this->product_id
|
||||||
|
];
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Get an attribute from the model.
|
* Get an attribute from the model.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue