Installation
Install Search with Composer.
shell
composer require raxos/searchRequirements
- PHP 8.5 or newer.
- The
ext-ctypeextension. - The
ext-mbstringextension.
Raxos dependencies
Search builds on several other packages in the monorepo. Composer resolves these automatically, but it helps to know where the pieces come from:
- raxos/contract: the
FilterInterface,PolicyInterface,StructuredFilterInterfaceand query node contracts. - raxos/database: filters operate on a query interface, and every searchable class extends the ORM
Model. - raxos/error: every exception in
Raxos\Search\Errorextends the base exception class. - raxos/datetime: date and datetime range parsing is built on the date primitives.
- raxos/foundation: shared utilities used across the package.
- raxos/reflection: the model attributes are read with the reflection helpers.
Configure a connection first
Search does not open its own database connection. Configure raxos/database with a connection before you register any model, otherwise a search cannot build or run its queries.
Return to the Search introduction.