Download the PHP package shammaa/laravel-search without Composer

On this page you can find all versions of the php package shammaa/laravel-search. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-search

Laravel Search

License: MIT PHP Version Laravel Version

A professional, high-performance search library for Laravel with MySQL Full-Text Search, advanced query builder, Arabic support, and search analytics.

✨ Features

Core Features

Performance & Scalability

Developer Experience

πŸ“‹ Requirements

πŸ“¦ Installation

1. Install via Composer

2. Publish Configuration (Optional)

This creates config/search.php with all available options.

3. Configure Environment (Optional)

Add these to your .env file if you want to customize defaults:

πŸš€ Quick Start

Step 1: Add Searchable Trait to Your Model

Step 2: Create FULLTEXT Index

This creates a FULLTEXT index on your searchable fields. The index is created automatically when you first create a model, but you can also create it manually.

Step 3: Start Searching!

πŸ“– Usage Guide

Basic Search

Advanced Filtering

WHERE Clauses

WHERE IN / NOT IN

NULL Checks

Range Queries

Faceted Search

Faceted search allows you to get aggregated counts for different field values:

Sorting

Autocomplete

Arabic Search

The package automatically supports Arabic text search:

Using the Facade

🎯 Artisan Commands

Index Management

Statistics & Monitoring

βš™οΈ Configuration

The config/search.php file contains all configuration options:

MySQL Configuration

Indexing Configuration

Cache Configuration

Analytics Configuration

Performance Configuration

πŸ”§ Advanced Usage

Custom Search Modes

MySQL supports two search modes:

Natural Language Mode (Default)

Best for: Natural language queries, relevance ranking

Boolean Mode

Allows operators like +, -, *, "phrase":

Queue Configuration

For large datasets, use queues for indexing:

Make sure your queue worker is running:

Manual Index Management

πŸ“Š Performance

Benchmarks

Based on testing with typical hardware:

Records Search Time Memory Usage
10K 10-50ms ~2MB
100K 50-150ms ~5MB
1M 100-500ms ~10MB
10M 500ms-2s ~20MB

Performance varies based on hardware, query complexity, and data characteristics.

Optimization Tips

  1. Use Caching: Enable caching for frequently searched queries
  2. Queue Indexing: Use queues for large datasets
  3. Limit Results: Use limit() to reduce result set size
  4. Select Fields: Only select needed fields with select()
  5. Index Optimization: Ensure your MySQL FULLTEXT indexes are optimized
  6. MySQL Configuration: Adjust ft_min_word_len for shorter words

MySQL FULLTEXT Configuration

To search for words shorter than 4 characters, modify MySQL configuration:

Then rebuild your indexes:

πŸ” Troubleshooting

No Search Results

  1. Check if index exists:

  2. Verify minimum word length:

    • MySQL default is 4 characters
    • Words shorter than this won't be indexed
    • Solution: Adjust ft_min_word_len in MySQL config
  3. Check searchable fields:

Slow Search Performance

  1. Enable caching:

  2. Use queue for indexing:

  3. Limit results:

  4. Check MySQL FULLTEXT index:

Index Creation Fails

  1. Check table engine:

    • Must be InnoDB or MyISAM
    • InnoDB recommended for MySQL 5.6+
  2. Check column types:

    • FULLTEXT only works with TEXT and VARCHAR columns
  3. Check MySQL version:
    • MySQL 5.6+ required for InnoDB FULLTEXT

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Setup

πŸ“„ License

This package is open-sourced software licensed under the MIT license.

πŸ‘¨β€πŸ’» Author

Shadi Shammaa

πŸ™ Credits

This package uses MySQL Full-Text Search instead of external search engines, making it:

Perfect for applications that need powerful search without the complexity of managing external search servers like Elasticsearch or Meilisearch.

πŸ“š Additional Resources

πŸ—ΊοΈ Roadmap


Made with ❀️ for the Laravel community


All versions of laravel-search with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
illuminate/database Version ^9.0|^10.0|^11.0|^12.0
illuminate/cache Version ^9.0|^10.0|^11.0|^12.0
illuminate/queue Version ^9.0|^10.0|^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package shammaa/laravel-search contains the following files

Loading the files please wait ...