Tuner Docs

A Laravel package to fine-tune your APIs.

View on GitHub
📚 Documentation

Configuration

By default, Tuner enables most features with minimal setup.
However, you can override the default behavior in your Eloquent models by defining specific configuration methods.



Projection

Define which columns are allowed for projection.

protected function getProjectableColumns(): array
{
    return ['*']; // Allow all columns
}


Sorting

Define which columns can be sorted.

protected function getSortableColumns(): array
{
    return ['*']; // Allow sorting on all columns
}


Define which columns are searchable.

protected function getSearchableColumns(): array
{
    return ['*']; // Allow searching on all columns
}


Filtering

Define which columns are filterable.

protected function getFilterableColumns(): array
{
    return ['*']; // Allow filtering on all columns
}


Limiting

Control whether the model can be limited with the limit modifier.

protected function limitable(): bool
{
    return true; // Enable limit for this model
}


Pagination

Control whether the model can use pagination with the per-page modifier.

protected function paginatable(): bool
{
    return true; // Enable pagination for this model
}


Notes

protected function getSortableColumns(): array
{
    return ['id', 'name', 'created_at'];
}