laravel_elasticsearch_scout
1.0.0
This project demonstrates how to integrate Elasticsearch 8 into a Laravel 11 application using the Repository and Service pattern for a clean and maintainable architecture. It showcases building a RESTful API that leverages Elasticsearch for powerful search capabilities.
babenkoivan/elastic-scout-driver and babenkoivan/elastic-scout-driver-plus packages to ensure Elasticsearch indices are automatically updated when models are created, updated, or deleted.git clone https://github.com/ninhhuynh1999/laravel_elasticsearch_books.gitcomposer install.env.example to .env and update database and Elasticsearch credentials.config/elastic.php file.php artisan key:generatephp artisan migrate --seed app/
├── Classes/ // DTOs (Data Transfer Objects), Request Filters, etc.
├── Models/ // Eloquent models
├── Repositories/ // Repository interfaces and implementations
├── Services/ // Service interfaces and implementations
├── Traits/ // Reusable traits, including the "Queryable" trait
routes/
api.php // API routes
Feel free to contribute to this project by submitting issues or pull requests.
This project is licensed under the MIT License.