I think what you are looking for is and ELasticserach Package for Laravel that leverages the Elasticsearch's php client to integrate it . I m referencing some of the packages here. and a Laracon talk you should be watching: The spatie indexing package.
Ongr-io and also visit ongr-io website for more
Elasticquent ~this repository is perhaps abandoned but works with elasticsearch 6+ though.
A better way is to not use elasticsearch as a Primary Database. and only for search and indexing. while you can still use mysql for you major requirement, and leave the details for elasticsearch.
For example, for an E-commerce website, one would store the crucial data of re-sellers and their products in a relational database like mysql,(for authorization and authentication that laravel provides) while indexing the complex products data and and other metadata in to Elasticsearch for blazing fast Search ( Real-time search suggestion, Filters) and Analytics (Product recommendations, personalize ads. logging, monitoring website traffic etc) as its so easy since Elasticsearch is a document database.
You do not have to move the whole ecosystem Laravel is built up on(Authentications, Models, etc utilize mysql to give you these features out of the box. ) I m an intermediate developer myself. and apologize for any communication gap as i not a native English speaker.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community