Index extends Model Uses HasUniqueIdentifier

Representation of a single indexed post from the database.

Table of Contents

$fillable  : array<string|int, mixed>
$timestamps  : bool
$primaryKey  : string
$table  : string
scopeByFilterID()  : Builder
Scope the index query to target data with from a specific filter id.
scopeByID()  : Builder
Scope the index query to target data with a specific post id.

Properties

$fillable

public array<string|int, mixed> $fillable = ['post_id', 'filter_id', 'facet_name', 'facet_value', 'facet_display_value', 'term_id', 'parent_id', 'depth', 'variation_id']

$timestamps

public bool $timestamps = \false

$primaryKey

protected string $primaryKey = 'id'

$table

protected string $table = \Barn2\Plugin\WC_Filters\Plugin::META_PREFIX . 'index'

Methods

scopeByFilterID()

Scope the index query to target data with from a specific filter id.

public scopeByFilterID(Builder $query, string $filter_id) : Builder
Parameters
$query : Builder
$filter_id : string
Return values
Builder

scopeByID()

Scope the index query to target data with a specific post id.

public scopeByID(Builder $query, string $post_id) : Builder
Parameters
$query : Builder
$post_id : string
Return values
Builder

Search results