Searchable is a trait for Laravel 4.2+ and Laravel 5.0 that adds a simple search function to Eloquent Models. Searchable allows you to perform searches in a table giving priorities to each field for the table and its relations. This is not optimized for big searches, but sometimes you just need to make it simple (Although it is not slow). By default, multi-word search terms are split and Searchable searches for each word individually. Relevance plays a role in prioritizing matches that match on multiple words. If you want to prioritize matches that include the multi-word search (thus, without splitting into words) you can enable full-text search by setting the third value to true.
Features
- Add the trait to your model and your search rules
- Documentation available
- Easy as laravel default queries
- Search method is compatible with any eloquent method
- Custom Threshold
- Entire Text search
Categories
FrameworksLicense
MIT LicenseFollow Laravel Searchable
Other Useful Business Software
AI-generated apps that pass security review
Retool lets you generate dashboards, admin panels, and workflows directly on your data. Type something like “Build me a revenue dashboard on my Stripe data” and get a working app with security, permissions, and compliance built in from day one. Whether on our cloud or self-hosted, create the internal software your team needs without compromising enterprise standards or control.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of Laravel Searchable!