PHPackages                             filippo-toso/fulltext - 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. filippo-toso/fulltext

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

filippo-toso/fulltext
=====================

Easily add fulltext search capabilities to your Eloquent models

v1.1.2(2y ago)2995MITPHPPHP ^5.6 || ^7.0 || ^8.0 || ^9.0

Since Jan 12Pushed 2y agoCompare

[ Source](https://github.com/filippotoso/fulltext)[ Packagist](https://packagist.org/packages/filippo-toso/fulltext)[ RSS](/packages/filippo-toso-fulltext/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (11)Used By (0)

Fulltext
========

[](#fulltext)

A simple way to add fulltext capabilities to your Eloquent models (just for MySQL for the moment).

Requirements
------------

[](#requirements)

- PHP 5.6+
- Laravel 5.0+

Installing
----------

[](#installing)

Use Composer to install it:

```
composer require filippo-toso/fulltext

```

Using It
--------

[](#using-it)

Create a fulltext index in your migrations:

```
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

use FilippoToso\Fulltext\FullText;

class AddIndexesToUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        // Create a fulltext index in the users table for the first_name and last_name columns
        FullText::fullTextIndex('users', ['first_name', 'last_name']);

        // You can also specify a name for the index with the third parameter
        FullText::fullTextIndex('users', ['city', 'address', 'country'], 'search_address');

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {

        Schema::table('users', function (Blueprint $table) {
            $table->dropIndex(['first_name', 'last_name']);
            $table->dropIndex('search_address');
        });

    }

}

```

Enable fulltext functions within the User model (for instance):

```
namespace App;

use Illuminate\Database\Eloquent\Model;
use FilippoToso\FullText\Traits\FullText;

class User extends Model
{
    use FullText;
}

```

Use the FullText trait's features:

```
// Use the whereMatch() scope to search for all users named "filippo"
$users = App\User::select('*')
                ->whereMatch(['first_name', 'last_name'], 'filippo')
                ->get();

// Include in the result the score column with the matching score
$users = App\User::select('*')
                ->whereMatch(['first_name', 'last_name'], 'filippo')
                ->selectMatchScore(['first_name', 'last_name'], 'filippo')
                ->get();

// You can also include the name of the score column with the third parameter of selectMatchScore()
$users = App\User::select('*')
                ->whereMatch(['first_name', 'last_name'], 'filippo')
                ->selectMatchScore(['first_name', 'last_name'], 'filippo', 'matching_score')
                ->get();

```

###  Health Score

37

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~237 days

Recently: every ~532 days

Total

10

Last Release

901d ago

PHP version history (2 changes)v1.0.0PHP ^5.6 || ^7.0

v1.1.1PHP ^5.6 || ^7.0 || ^8.0 || ^9.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/55d89f2d44fb12225de2119994028ee69e36770bcf33c2b1ddf0d6672d28151b?d=identicon)[filippo.toso](/maintainers/filippo.toso)

---

Top Contributors

[![filippotoso](https://avatars.githubusercontent.com/u/26958813?v=4)](https://github.com/filippotoso "filippotoso (11 commits)")

### Embed Badge

![Health badge](/badges/filippo-toso-fulltext/health.svg)

```
[![Health](https://phpackages.com/badges/filippo-toso-fulltext/health.svg)](https://phpackages.com/packages/filippo-toso-fulltext)
```

###  Alternatives

[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[jeroen-g/explorer

Next-gen Elasticsearch driver for Laravel Scout.

397612.3k](/packages/jeroen-g-explorer)[swisnl/laravel-fulltext

Fulltext indexing and searching for Laravel

184104.5k5](/packages/swisnl-laravel-fulltext)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[romanstruk/manticore-scout-engine

Laravel Manticore Scout Engine

4818.1k](/packages/romanstruk-manticore-scout-engine)[statamic-rad-pack/meilisearch

meilisearch search driver for Statamic

1661.7k](/packages/statamic-rad-pack-meilisearch)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
