config/vectorify.php file is the central mechanism for defining how Laravel models are processed and upserted to Vectorify. Through a declarative configuration file, it handles collection (table) definitions, column mappings, metadata extraction, and tenancy configuration.
Global Settings
The configuration file contains several global settings that affect the entire package behaviour:
Collections
As described in the concepts page, collections define how Laravel models are synchronized with Vectorify and can use three different syntax patterns. Each collection specifies the data source, field mappings, transformations, and metadata definitions.
Simple Model Reference
The simplest collection configuration references a model class:$fillable or a custom $vectorify property as the column list.
Resource Class Integration
Theresource configuration allows using Laravel API Resources for data transformation:
query is a callable which returns Illuminate\Database\Eloquent\Builder.
Named Model Columns
Complex collections use named keys with configuration arrays:query is a callable which returns Illuminate\Database\Eloquent\Builder.
Column Configuration
Complex columns use arrays to specify transformation and metadata options:Relationship Configuration
Relationships are configured using nested column structures:Metadata Configuration
Metadata defines additional filterable attributes that are stored separately from the row data.Column-Level Metadata
Metadata can be defined at the column level using themetadata flag: