Plastic is an Elasticsearch ODM and mapper for Laravel. If you are using Laravel >=5.5 the service provider will be automatically discovered otherwise we need to add the plastic service provider to config/app.php under the providers key: Sleimanx2\Plastic\PlasticServiceProvider::class

By default, Plastic will store all visible properties of your model, using $model->toArray(). In addition, Plastic provides you with two ways to manually specify which attributes/relations should be stored in Elasticsearch.

You can customize in which index your model data will be stored by setting the $documentIndex property to your model: public $documentIndex = 'custom_index'; Storing Model Content
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners