PHPackages                             devtools-marvellous/sextant - 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. [Framework](/categories/framework)
4. /
5. devtools-marvellous/sextant

ActiveLibrary[Framework](/categories/framework)

devtools-marvellous/sextant
===========================

Laravel Sextant Engine

v1.3.5(1y ago)0742MITPHP

Since Oct 18Pushed 1y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (4)Versions (4)Used By (2)

Laravel Sextant.
----------------

[](#laravel-sextant)

Laravel Sextant - this is powerful, smart and simple filtration engine for api calls for laravel.

Capability Tale:

LaravelFilter&gt;=5.4.x &lt; 5.8.x[2.0.x](https://git.attractgroup.com/amondar/LaravelFilterAndSorting)&gt;=5.8^1.0.7Installation
------------

[](#installation)

- add below code into `composer.json`:

```
"repositories": [
    {
        "url": "https://git.attractgroup.com/amondar/sextant.git",
        "type": "git"
    }
]
"require": {
  "amondar/sextant": "^1.0.7"
}
```

- Publish configuration:

```
php artisan vendor:publish --provider="Amondar\Sextant\SextantServiceProvider"
```

Basics
------

[](#basics)

Use `HasSextantOperations` trait in the model. Redeclare `extraFields()` function if you need to make some relations publicly accessible for the api calls. Use below example:

```
    class SomeModel extends Model
    {
        use HasSextantOperations;

        ...

        public function extraFields()
        {
            return ['someRelation'];
        }

        ...

        public function someRelation()
        {
            return $this->hasOne(SomeRelation::class);
        }
    }
```

By default, after using sextant trait, it connects to the model as scope operation. So you can call it as below:

```
  public function index(Request $request)
  {
      return SomeModel::withSextant($request)->get()
  }
```

Filter Usage
------------

[](#filter-usage)

You must use `$_GET` parameter called `filter` to interacts with model filtering. Filter parameter expects json string with parameters.

### Available operations:

[](#available-operations)

**isNull** - not required parameter parameter, `accept` true or `false`, add `AND $key IS NULL` or `AND $key IS NOT NULL` to sql query string

**operation** - is a logical operation identifier, accept `'>','=','orWhere('field', 'some other search');
            })
     }
 }
```

This code will convert into SQL:

```
  SELECT * FROM `messages` WHERE `some_field` = 'search' AND (`field` = 'some search' OR `field` = 'some other search')
```

Raw usage
---------

[](#raw-usage)

You can use Sextant without model calls or on models that does not use Sextant operations trait. For example:

```
 app('sextant')->filtrate(User::class, $request, $predefinedParameters);

 \\or

 Sextant::filtrate(User::class, $request, $predefinedParameters);
```

As you can see, you can use filtration on model class. If model does not have Sextant operations, we will user our default model, which we will convert into yours:

```
 $newModel = new SextantModel();
 $newModel->setTable($model->getTable());
 $newModel->setKeyName($model->getKeyName());
 $newModel->setKeyType($model->getKeyType());

 return $newModel->withSextant($request, $params);
```

**NOTE:** that default models has empty `extraFields` and `extraScopes`. **NOTE:** that you can pre-define parameters for filtration by passing third parameter into `->withSextant(...)` function. Just pass parameters as array. Example:

```
 app('sextant')->filtrate(User::class, $request, ['sort' => '-created_at', 'filter' => ['posts.views_count' => ['operation' => '>=', 'value' => 10]]]);

 \\or

 Sextant::filtrate(User::class, $request, ['sort' => '-created_at', 'filter' => ['posts.views_count' => ['operation' => '>=', 'value' => 10]]]);
```

Extensions
----------

[](#extensions)

You can create your own extensions for Sextant engine. Just add your new action into config. `NOTE:` Every new action must implement `Amondar\Sextant\Contracts\SextantActionContract::class`

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~702 days

Total

2

Last Release

605d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a019d2919d241ac172711fe39486bbdab98e0e372101126f12fff46e19dfad2?d=identicon)[devtools-marvellous](/maintainers/devtools-marvellous)

---

Top Contributors

[![simon-hogg](https://avatars.githubusercontent.com/u/17775908?v=4)](https://github.com/simon-hogg "simon-hogg (2 commits)")[![yurenery](https://avatars.githubusercontent.com/u/9455581?v=4)](https://github.com/yurenery "yurenery (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/devtools-marvellous-sextant/health.svg)

```
[![Health](https://phpackages.com/badges/devtools-marvellous-sextant/health.svg)](https://phpackages.com/packages/devtools-marvellous-sextant)
```

###  Alternatives

[krayin/laravel-crm

Krayin CRM

22.0k32.8k1](/packages/krayin-laravel-crm)[unopim/unopim

UnoPim Laravel PIM

9.4k1.8k](/packages/unopim-unopim)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3691.5k](/packages/codewithdennis-larament)

PHPackages © 2026

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