PHPackages                             shammaa/laravel-search - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. shammaa/laravel-search

ActiveLibrary[Database &amp; ORM](/categories/database)

shammaa/laravel-search
======================

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

1.1.0(5mo ago)12MITPHPPHP ^8.1

Since Dec 7Pushed 5mo agoCompare

[ Source](https://github.com/shammaa/laravel-search)[ Packagist](https://packagist.org/packages/shammaa/laravel-search)[ Docs](https://github.com/shammaa/laravel-search)[ RSS](/packages/shammaa-laravel-search/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (3)Used By (0)

Laravel Search
==============

[](#laravel-search)

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![PHP Version](https://camo.githubusercontent.com/83dd395020c37276225039739320f6c8e7e99963ab21ee3d09282cb48dad2a60/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d626c7565)](https://www.php.net/)[![Laravel Version](https://camo.githubusercontent.com/af5c3f4e0f6d0f84b5f14f133c60b4a2643faa7a701966c38b3dd9e243e1487a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d392532422d726564)](https://laravel.com/)

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

✨ Features
----------

[](#-features)

### Core Features

[](#core-features)

- 🚀 **MySQL Full-Text Search** - Fast search using native FULLTEXT indexes (no external dependencies)
- 🔍 **Advanced Query Builder** - Powerful, fluent query builder with filters, facets, and sorting
- 🌍 **Arabic Language Support** - Excellent Arabic search capabilities
- ⚡ **Auto-Indexing** - Automatic FULLTEXT index creation and management
- 📊 **Search Analytics** - Track searches, popular queries, and statistics
- 🎯 **Faceted Search** - Advanced faceted search with multiple filters
- 💡 **Auto-complete** - Built-in autocomplete functionality

### Performance &amp; Scalability

[](#performance--scalability)

- 🔄 **Queue Support** - Non-blocking index creation with queue jobs
- 💾 **Smart Caching** - Intelligent caching for search results and popular queries
- ⚙️ **Zero Configuration** - Works out of the box with sensible defaults
- 📈 **Scalable** - Handles millions of records efficiently

### Developer Experience

[](#developer-experience)

- 🎨 **Type Safe** - Full type hints and strict types (PHP 8.1+)
- 🛠️ **Artisan Commands** - Comprehensive CLI tools for index management
- 📦 **Laravel Integration** - Seamless integration with Laravel ecosystem
- 🔌 **Facade Support** - Clean, expressive API

📋 Requirements
--------------

[](#-requirements)

- PHP &gt;= 8.1
- Laravel &gt;= 9.0
- MySQL &gt;= 5.6 (with FULLTEXT support) or MariaDB &gt;= 10.0

📦 Installation
--------------

[](#-installation)

### 1. Install via Composer

[](#1-install-via-composer)

```
composer require shammaa/laravel-search
```

### 2. Publish Configuration (Optional)

[](#2-publish-configuration-optional)

```
php artisan vendor:publish --tag=search-config
```

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

### 3. Configure Environment (Optional)

[](#3-configure-environment-optional)

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

```
# MySQL Search Mode
MYSQL_SEARCH_MODE=NATURAL_LANGUAGE  # or BOOLEAN

# Indexing Settings
SEARCH_AUTO_INDEX=true
SEARCH_QUEUE_INDEX=true
SEARCH_QUEUE_NAME=search

# Cache Settings
SEARCH_CACHE_ENABLED=true
SEARCH_CACHE_TTL=3600

# Analytics
SEARCH_ANALYTICS_ENABLED=true
```

🚀 Quick Start
-------------

[](#-quick-start)

### Step 1: Add Searchable Trait to Your Model

[](#step-1-add-searchable-trait-to-your-model)

```
