Download the PHP package power-components/turbine without Composer

On this page you can find all versions of the php package power-components/turbine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package turbine

Turbine

The framework-agnostic data engine behind the Turbine table component.

It runs search, filters, sort, pagination, and row transformations over Eloquent, Query Builder, Collections, or Scout, and returns a typed JSON envelope. There is no Blade and no JavaScript in the box — feed Inertia (React / Vue), Livewire, REST APIs, or plain AJAX with the exact same engine.

You describe the grid once in PHP. The engine does the rest. Your front-end just renders JSON.

Contents

Requirements & Install

How it fits together

The front-end owns rendering and interaction; the core owns data and rules. State travels in the request; results travel in the envelope.

Quickstart

Describe your grid in PHP using the Turbine builder:

Builder reference

Method Description
datasource(Closure) Returns Eloquent Builder, Scout Builder, or Collection. Required.
fields(Fields) Maps row shape and output keys.
columns(array) List of Column instances for schema, sorting, and search.
filters(array) List of Filter* components.
actions(Closure) fn ($row) => Button[] — per-row actions.
actionRules(Closure) fn ($row) => Rule[] — conditional rules per row/action/cell.
relationSearch(array) Search across relations, e.g. ['category' => ['name']].
fromRequest(Request) Reads state from the turbine request parameter.
setUp(array) List of SetUp components (Header, Footer, Detail, Exportable, …) serialized under meta.setup.
state(array) Sets state from a raw array (Inertia JSON body, tests, etc.).
toArray() / envelope() / toResponse() Returns array, GridResponse, or JsonResponse.

Portable Grid Definitions

The builder is fluent, but you can also describe a grid as a single framework-neutral class by extending GridDefinition. The same class drives an Inertia controller, a REST endpoint, or a Livewire PowerGrid component — write it once, switch front-ends without rewriting the grid.

Build fields and SetUp components with the static factories — Fields::make() and Turbine::header() / footer() / detail() / exportable($file) / cache() / filterBuilder() / responsive(). These are the same construction calls the Livewire PowerGrid facade exposes (PowerGrid::footer()), so a definition reads identically on both stacks.

Consume it from an Inertia controller:

Every builder option has a matching overridable method — datasource, fields, columns, filters, actions, actionRules, relationSearch, searchMorphs, transformQuery, setUp — plus the $tableName, $primaryKey, $perPage, $pageName properties. envelope($request), toArray($request), toResponse($request) and context($request) (for exporting) feed the request in for you. Only datasource() is required.

The class implements PowerComponents\Turbine\Contracts\GridSchema, the shared declaration surface both Turbine and Livewire PowerGrid understand.

Migrating between Livewire and Inertia? Keep the UsersGrid class untouched and swap only the adapter. Inertia calls ->envelope($request) (or ->toArray($request) for a plain array); a Livewire PowerGrid component points its definition() at the same class (see the PowerGrid README). Columns, fields, filters, actions and setUp are identical on both sides — the difference is purely the wiring.

The Request Contract

Grid state (search, sort, filters) is read from the turbine query parameter on the incoming request. Pagination uses the standard Laravel page parameter.

The Response Envelope

->envelope() returns a GridResponse DTO. ->toArray() returns a plain array. ->toResponse() wraps it in a JsonResponse. All properties are typed:

DTO classes

Class Key properties
GridResponse data, meta, columns, filters, actions
MetaResponse pagination, sort, search, filters, filterBuilder, setup
PaginationResponse currentPage, perPage, from, to, total, lastPage
SortResponse field, direction, multiSort, sortArray
ColumnSchema field, title, sortable, searchable, hidden
FilterSchema key, field, column, title
ActionDescriptor id, label, icon, tag, visible, disabled, attributes

Every DTO implements JsonSerializable and exposes ->all() for array access.

Actions & Rules

Actions use the Button DSL and resolve on the server:

The ActionDescriptor resolves into the attributes bag:

Event types: link, dispatch, dispatchTo, dispatchSelf, modal, toggleDetail, call.

Conditional Rules

Apply server-side rules per row, button, or cell:

Supported rule target classes: RuleActions, RuleRows, RuleCheckbox, RuleRadio, RuleToggleable, RuleEditOnClick.

Filters

Turbine provides built-in filter components in PowerComponents\Turbine\Components\Filters\*:

Filter Class Request Key Description
FilterInputText input_text Text matching (contains, starts_with, exact, etc.)
FilterSelect / FilterEnumSelect select Single choice from collection, array, or PHP Enum
FilterMultiSelect / FilterMultiSelectAsync multi_select Multiple choices in-memory or from async endpoint
FilterBoolean boolean True / false toggle
FilterNumber number Numeric range filter
FilterDatePicker / FilterDateTimePicker date / datetime Date and date-time range filters
FilterDynamic custom Custom front-end component props

Datasources

Pass any supported data source to datasource():

Custom Datasources

Implement DataSourceProcessor to handle custom APIs or repositories:

Exporting Data

Generate CSV or Excel (.xlsx) files directly from your grid context:

State Persistence

Save grid state (filters, sorting, column visibility) across requests:

Reusing Components & Low-Level API

Re-use an existing Turbine component as a data engine endpoint:

Or drop down to low-level context primitives:

Credits

Originally extracted from versions 6.x and 7.x of Livewire PowerGrid. Special thanks to all contributors!

License

MIT


All versions of turbine with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts Version ^12.0 || ^13.0
illuminate/database Version ^12.0 || ^13.0
illuminate/http Version ^12.0 || ^13.0
illuminate/pagination Version ^12.0 || ^13.0
illuminate/pipeline Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package power-components/turbine contains the following files

Loading the files please wait ...