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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners