{"repo":"devemio/elasticsearch-eloquent","free":true,"listed":false,"github":"https://github.com/devemio/elasticsearch-eloquent","clone":"git clone https://github.com/devemio/elasticsearch-eloquent.git","description":"⚡️ Models like Eloquent for Elasticsearch.","language":"PHP","stars":112,"topics":["elasticsearch","php"],"license":null,"category":"data-pipelines","readme_excerpt":"Elasticsearch Eloquent 2.x [![Latest Version on Packagist][ico-version]][link-packagist] [![Software License][ico-license]]() [![Build Status][ico-travis]][link-travis] [![Coverage Status][ico-scrutinizer]][link-scrutinizer] [![Quality Score][ico-code-quality]][link-code-quality] [![Total Downloads][ico-downloads]][link-downloads] This package allows you to interact with Elasticsearch as you interact with Eloquent models in Laravel. Requirements - PHP = 8.0 - Elasticsearch = 7.0 Install Via Composer Usage Create a new model You should override index and type properties to determine the document path. Use the static create() method to create the document in Elasticsearch: Save the model Use save() method to store model data in Elasticsearch. Let's see how this looks in Elasticsearch: Fields created at and updated at were created automatically. Find existing model If you have big data in Elasticsearch you can specify certain fields to retrieve: There are the following methods: findOrFail() returns ModelNotFoundException exception if no result found. Cache There is a smart model cache when you use methods like find() , findOrFail() and so on. Partial update You can use the partial update to update specific fields quickly. Delete models You can use the static method: Model events Out of the box you are provided with a simple implementation of events. You can override the following methods to define events: saving() is called before saving, updating, creating the model saved() is ","default_branch":null,"files":null,"tree":[],"storefront":"/r/devemio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/devemio/elasticsearch-eloquent/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}