PHPackages                             clydescobidal/larasearch - 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. [Search &amp; Filtering](/categories/search)
4. /
5. clydescobidal/larasearch

ActiveLibrary[Search &amp; Filtering](/categories/search)

clydescobidal/larasearch
========================

A Laravel package that provides FULLTEXT index search functionality

1.0.6(2y ago)0246MITPHPPHP ^8.0 || ^8.1 || ^8.2

Since Nov 28Pushed 2y ago1 watchersCompare

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

READMEChangelog (7)Dependencies (3)Versions (8)Used By (0)

[![](https://raw.githubusercontent.com/clydescobidal/larasearch/main/art/bannercard.webp)](https://raw.githubusercontent.com/clydescobidal/larasearch/main/art/bannercard.webp)

Larasearch
==========

[](#larasearch)

[![Latest Stable Version](https://camo.githubusercontent.com/c51d565ab405f0afd9675ef034e7ad3bc91630662fd94712c6456caf944e61cf/687474703a2f2f706f7365722e707567782e6f72672f636c79646573636f626964616c2f6c6172617365617263682f76)](https://packagist.org/packages/clydescobidal/larasearch)[![Total Downloads](https://camo.githubusercontent.com/ee2387870b12b2c9b6c6fc88bccddee9d7d8db3dc6ab14fc1967611df3aea699/687474703a2f2f706f7365722e707567782e6f72672f636c79646573636f626964616c2f6c6172617365617263682f646f776e6c6f616473)](https://packagist.org/packages/clydescobidal/larasearch)[![License](https://camo.githubusercontent.com/46cfb32159e73adad7051781d8f33fc250c1681778712748b3ab05fef4c00d4f/687474703a2f2f706f7365722e707567782e6f72672f636c79646573636f626964616c2f6c6172617365617263682f6c6963656e7365)](https://packagist.org/packages/clydescobidal/larasearch)[![GitHub Actions](https://github.com/clydescobidal/larasearch/actions/workflows/run-tests.yaml/badge.svg)](https://github.com/clydescobidal/larasearch/actions/workflows/run-tests.yaml/badge.svg)

The goal of this Laravel package is to offer fast FULLTEXT indexed searches. This is only relevant if you wish to include a basic search feature in your project. However, if your project has a large amount of data that needs to be searched and is frequently used, search engines like Typesense, ElasticSearch, Algolia, and similar ones are more appropriate.

Search queries are executed on the searchable table to save your main table from the heavy search workload.

Features
--------

[](#features)

- FULLTEXT index search
- Cached results

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require clydescobidal/larasearch
```

Publish the configuration file:

```
php artisan vendor:publish --provider="Clydescobidal\Larasearch\LarasearchServiceProvider"
```

Run migration:

```
php artisan migrate
```

Usage
-----

[](#usage)

Add the `Clydescobidal\Larasearch\Searchable` trait to the model you would like to make searchable. Models that are using this trait will be indexed in the searchable table whenever changes are made on the model.

```
