Enter the tables and columns you want to be accessible by AI
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:
Setting | Purpose |
---|---|
api_key | Authentication token for Vectorify |
tenancy | Tenancy mode: single , multi:column , multi:domain |
collections | Array of collection definitions |
$fillable
or a custom $vectorify
property as the column list.
resource
configuration allows using Laravel API Resources for data transformation:
query
is a callable which returns Illuminate\Database\Eloquent\Builder
.
query
is a callable which returns Illuminate\Database\Eloquent\Builder
.
Option | Purpose | Example |
---|---|---|
alias | Rename field in output | 'alias' => 'customer_name' |
data | Include in data payload | 'data' => false |
type | Data type for formatting | 'type' => 'datetime' |
format | Date/time formatting | 'format' => 'Y-m-d' |
metadata | Include in metadata | 'metadata' => true |
tenant | Use for multi-tenancy | 'tenant' => true |
relationship | Define a relationship | 'relationship' => true |
metadata
flag:
Type | Purpose | Additional Config |
---|---|---|
string | Text and numeric values | None |
datetime | Date/time values | format option |
enum | Enumerated values | options array |