PHPackages                             laravelha/support - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. laravelha/support

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

laravelha/support
=================

Laravelha Support

1.0.4(5y ago)85.2k24MITPHP

Since Jan 5Pushed 5y ago2 watchersCompare

[ Source](https://github.com/laravelha/support)[ Packagist](https://packagist.org/packages/laravelha/support)[ RSS](/packages/laravelha-support/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)Dependencies (1)Versions (6)Used By (4)

Laravelha Support
=================

[](#laravelha-support)

Package of Support for development on Laravel

Install
-------

[](#install)

```
composer require laravelha/support
```

Features
--------

[](#features)

1. Model Traits
    - Tableable
    - RequestQueryBuildable

### How Tableable works

[](#how-tableable-works)

`Tableable` configures models represented in the data table.

#### Requirements

[](#requirements)

- [laravel-datatables](https://github.com/yajra/laravel-datatables)

#### Step-by-step

[](#step-by-step)

1. Import the trait on model.

```
use Laravelha\Support\Traits\Tableable;

class Modelo extends Model {
    //
}
```

2. Add the trait within class.

```
class Modelo extends Model {
    use Tableable;
    //
}
```

3. Implement the `getColumns` method.

```
    /**
     * ['data' => 'columnName', 'searchable' => true, 'orderable' => true, 'linkable' => false]
     *
     * searchable and orderable is true by default
     * linkable is false by default
     *
     * @return array[]
     */
    public static function getColumns(): array
    {
        return [
            ['data' => 'id', 'linkable' => true],
            ['data' => 'title'],
            ['data' => 'subtitle'],
            ['data' => 'slug'],
            ['data' => 'content'],
        ];
    }
```

> The options 'searchable' and 'orderable' are 'true' by default, but 'linkable' is 'false', if not informed.

4. On index action get the columns configuration.

```
public function index()
{
    $columns = Model::getColumns();

    return view('models.index', compact('columns'));
}
```

5. Create data action on controller.

```
public function data()
{
    return Model::getDatatable();
}
```

6. Create route for data action.

```
Route::get('/models/data', 'ModelController@data')->name('models.data');
```

7. Create table on index blade.

```

            @foreach($columns as $column)
                @lang('models.'.$column['data'])
            @endforeach

```

8. Config script.

```
@push('scripts')

    $(function () {
        var table = $('#models-table').DataTable({
            serverSide: true,
            processing: true,
            responsive: true,
            order: [ [0, 'desc'] ],
            ajax: {
                url: 'models/data'
            },
            columns: @json($columns),
            pagingType: 'full_numbers'
        });
    });

@endpush
```

### How RequestQueryBuildable works?

[](#how-requestquerybuildable-works)

`RequestQueryBuildable` makes behavior of SQL queries by parameters in the request.

1. Use `?only` separated by commas to filter columns like 'select' in SQL

```
query: only=field1;field2;field3...

```

2. Use `?search` with key and value to apply where or whereHas

```
query: ?search=key:value,key2:value2

class MyModel extends Model {
    public static function searchable() {
        return [
                'key' => 'operator',
                'key2' => 'operator',
               ];
    }
    // ...model
}

```

> define searchable method on model is needed and relationships are identified by dot relation.column

3. Use `?operators` to change search operator dynamically

```
query: field1:operator1

```

4. Use `?sort` to sort results

```
query: ?sort=field:direction;field2:direction

```

5. Use `?with` to load relation data separated by commas

```
query: relation1;relation2;relation3...

```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~69 days

Total

5

Last Release

2048d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5609896?v=4)[Pedro Augusto](/maintainers/pedroufv)[@pedroufv](https://github.com/pedroufv)

---

Top Contributors

[![pedroufv](https://avatars.githubusercontent.com/u/5609896?v=4)](https://github.com/pedroufv "pedroufv (12 commits)")[![Tiagofv](https://avatars.githubusercontent.com/u/39660849?v=4)](https://github.com/Tiagofv "Tiagofv (6 commits)")

---

Tags

laravelsupportLaravelha

### Embed Badge

![Health badge](/badges/laravelha-support/health.svg)

```
[![Health](https://phpackages.com/badges/laravelha-support/health.svg)](https://phpackages.com/packages/laravelha-support)
```

###  Alternatives

[prologue/support

Prologue Support is an extension for Illuminate Support

1616.8k](/packages/prologue-support)[binshops/laravel-ticket

A simple ticketing system for Laravel 5.1 – 5.8 and 6.\* - 7.\* - 8.\* - 9.\* - 10.\* -which integrates smoothly with Laravel default users and auth system

261.0k](/packages/binshops-laravel-ticket)

PHPackages © 2026

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