Skip to content

arqel-dev/table — API Reference

Namespace Arqel\Table\. Fluent builder, 12 column types, 8 filter types, query builder.

Arqel\Table\Table (final)

Main builder.

MethodTypeDescription
Table::make()selfFactory
columns(array<Column>)selfList of columns
filters(array<Filter>)selfList of filters
actions(array<Action>)selfRowActions
bulkActions(array<Action>)selfBulkActions (require selectable)
toolbarActions(array<Action>)selfToolbarActions
defaultSort(string $column, string $direction='asc')self
perPage(int) / perPageOptions(array<int>)selfPagination
searchable(bool=true) / selectable(bool=true)self
striped(bool=true) / compact(bool=true)self
emptyState(array)self['icon', 'title', 'description']
toArray()arraySchema serialized for Inertia

Columns

Arqel\Table\Column (abstract). Factory: Column::make($name) returns TextColumn by default.

ClassUse caseExtra setters
TextColumnDefault String/textlimit(int), wrap(bool)
BadgeColumnStatus with colorscolors(array), icons(array)
BooleanColumnCheckmarktrueIcon, falseIcon, trueColor, falseColor
DateColumnFormatted datesdate(string), dateTime(string), since(), timezone(string)
NumberColumnRight-aligned numericdecimals(int), prefix, suffix
IconColumnSingle iconoptions(array), size(string)
ImageColumnThumbnaildisk(string), circular(bool), size(int)
RelationshipColumnEager-loaded relationmake(name) + ->display(attribute)
ComputedColumnClosure-derivedfactory make(name, Closure)
SelectColumnEditable select celloptions(array|Closure), rules(array), debounce(int)
TextInputColumnEditable inline text-input cellrules(array), debounce(int), readonly(bool)
ToggleColumnEditable toggle cellonValue(mixed), offValue(mixed), debounce(int)

Common setters (on all): label, sortable(bool), searchable(bool), hidden(bool), hiddenOnMobile(bool), align(string), width(string), tooltip(string\|Closure).

Filters

Arqel\Table\Filter (abstract). Factory: Filter::make($name) (but use the concrete classes).

ClassUse caseExtra setters
SelectFilterSingle-value pickeroptions(array|Closure)
MultiSelectFilterMulti-value pickeroptions(array|Closure)
DateRangeFilterstart/end range(no extra setters)
TextFilterLike searchcolumn(string)
TernaryFiltertrue/false/alltrueLabel, falseLabel, allLabel
ScopeFilterEloquent scopefactory make($name, $scopeName)
QueryBuilderFilterVisual condition tree (AND/OR groups)constraints(array<Constraint>)
TrashedFilterSoft-delete three-state (without/with/only)(no extra setters)

Common setters: label, apply(Closure) (query override), default(mixed), placeholder(string).

Arqel\Table\TableQueryBuilder (final)

Orchestrates request → Eloquent query.

MethodDescription
for(Table, Builder, Request)Factory
paginate(): LengthAwarePaginatorApplies search/filter/sort/eager-load + paginate

Sort whitelisted against sortable columns. per_page validated against perPageOptions. Eager loading inferred from RelationshipColumn.

MIT License — built with Inertia + React + Laravel.