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

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

MIT License

Follow Laravel Searchable

Laravel Searchable Web Site

Other Useful Business Software
Gemini 3 and 200+ AI Models on One Platform Icon
Gemini 3 and 200+ AI Models on One Platform

Access Google's best plus Claude, Llama, and Gemma. Fine-tune and deploy from one console.

Build generative AI apps with Vertex AI. Switch between models without switching platforms.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Laravel Searchable!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Frameworks

Registered

2024-04-09