class LinkColumn extends Column

Traits

Properties

string $column_id

The unique identifier column for rows.

from  Columns
string $custom_column_id

A custom column ID override.

from  Columns
Collection|null $columns

Collection of defined columns.

from  Columns
bool $show_column_toggle

Whether to show the column toggle dropdown.

from  Columns
bool $column_toggle_dd_status

Status of the column toggle dropdown (open/closed).

from  Columns
bool $hasMobileCollapsedColumns

Indicates if there are columns collapsed on mobile view.

from  Columns
array $mobileCollapsedColumns

Array of columns that are collapsed on mobile.

from  Columns
string $label from  Column
string $key from  Column
string $index from  Column
bool $isVisible from  Column
bool $isHidden from  Column
bool $hideFromSelector from  Column
Closure|null $customData from  Column
string $classes from  Column
string $th_classes from  Column
string $th_wrapper_classes from  Column
bool $has_modified_data
bool $hide_on_mobile from  Column
bool $collapseOnMobile from  Column
bool $show_on_mobile from  Column
bool $cardTitle from  Column
Closure|null $cardTitleCallback from  Column
bool $triggerCardInfoModal from  Column
bool $showOnCard from  Column
bool $isEditable from  Column
string $editableType from  Column
array $editableOptions from  Column
callable|string|null $editableCallback from  Column
callable|null $sortableCallback from  Column
callable|null $searchableCallback from  Column
Closure|null $secondaryHeaderCallback from  Column
bool $isSortable from  Column
bool $isSearchable from  Column
static protected string[] $existingKeys from  Column
string|null $updateField from  Column
$isLink
mixed $href
string|null $text
string|null $tag_styles

Methods

void
setColumns()

Initialize and process column definitions.

from  Columns
Collection
getFreshColumns()

Get a fresh collection of column instances with closures intact.

from  Columns
array
resolveSecondaryHeaders(mixed $paginatedData)

Resolve secondary header values by calling each column's callback with the current rows.

from  Columns
void
showColumnToggle(bool $bool)

Show or hide the column toggle dropdown.

from  Columns
void
setColumnID(string $column_id)

Set the primary key column used to identify rows.

from  Columns
hideOnMobile(bool $bool)

Hide this column on mobile devices.

from  Columns
showOnMobile(bool $bool = true)

Show this column only on mobile devices.

from  Columns
view(string $view)

Set a custom Blade view for rendering the column cell.

from  Columns
styling(string $classes)

Set CSS classes for the column's table cell (td).

from  Columns
thStyling(string $classes)

Set CSS classes for the column's table header (th).

from  Columns
thWrapperStyling(string $classes)

Set CSS classes for the column's header wrapper element.

from  Columns
disableToggleWhen(Closure $function)

Set a closure that determines when the toggle should be disabled.

from  Columns
hideToggleWhen(Closure $function)

Set a closure that determines when the toggle should be hidden.

from  Columns
trigger(string $trigger)

Set the method name to call when a toggle column is toggled.

from  Columns
isBool()

Mark this column as a boolean column.

from  Columns
trueIs(mixed $true)

Set the value that represents "true" for boolean columns.

from  Columns
trueLabel(string $string)

Set the display label/icon for the "true" state.

from  Columns
falseLabel(string $string)

Set the display label/icon for the "false" state.

from  Columns
toHtml()

Allow the column value to be rendered as raw HTML.

from  Columns
text(string $text)

Set the display text for a link column.

from  Columns
href(Closure $function)

Set a closure that resolves the URL for a link column.

from  Columns
target(string $target)

Set the target attribute for a link column (e.g. '_blank').

from  Columns
popup(array $array = ['width' => 750, 'height' => 800])

Open the link in a popup window with the given dimensions.

from  Columns
classes(string $classes)

Set CSS classes for a link column's anchor tag.

from  Columns
customData(Closure $function)

Set a closure to transform the column's display value.

from  Columns
hideWhen(bool $bool)

Conditionally hide the column and remove it from the column selector.

from  Columns
hideFromSelector(bool $bool)

Hide this column from the column toggle selector.

from  Columns
isVisible(bool $bool)

Set the column's initial visibility.

from  Columns
sortColumnBy(string $column)

Set an alternative column key to use when sorting this column.

from  Columns
__construct(string $label, string|null $key = null)

Create a new LinkColumn instance.

static Column
make(string $label, string|null $key = null)

Static factory method.

collapseOnMobile(bool $bool = true)

Set the column to collapse on mobile devices.

from  Column
cardTitle(bool|callable $callback = true)

Set the column as the card title for mobile devices.

from  Column
triggerCardInfoModal(bool $bool = true)

Toggle whether clicking the card title opens the info modal.

from  Column
showOnCard(bool $bool = true)

Toggle whether this column is displayed on mobile cards.

from  Column
sortable(bool|callable $callback = true)

Mark the column as sortable.

from  Column
secondaryHeader(callable $callback)

Set a secondary header callback for this column.

from  Column
searchable(bool|callable $callback = true)

Mark the column as searchable.

from  Column
editable(string $type = 'input', array $options = [], callable|null $onUpdate = null)

Mark the column as editable.

from  Column
setUpdateField(string $field)

Set the database field to use when saving editable values.

from  Column
pushLeft()

Align the column content to the left.

from  Column
pushRight()

Align the column content to the right.

from  Column
centered()

Center the column content.

from  Column
static void
resetStaticKeys()

Reset the static key registry (used between test runs).

from  Column
string
generateUniqueKey(string $label)

Generate a unique slug key from the column label.

from  Column

Details

in Columns at line 53
void setColumns()

Initialize and process column definitions.

Handles mobile visibility, collapse behavior, and strips closures for Livewire serialization.

Return Value

void

in Columns at line 99
Collection getFreshColumns()

Get a fresh collection of column instances with closures intact.

Return Value

Collection

in Columns at line 114
array resolveSecondaryHeaders(mixed $paginatedData)

Resolve secondary header values by calling each column's callback with the current rows.

Parameters

mixed $paginatedData

Return Value

array

in Columns at line 136
void showColumnToggle(bool $bool)

Show or hide the column toggle dropdown.

Parameters

bool $bool

Return Value

void

in Columns at line 146
void setColumnID(string $column_id)

Set the primary key column used to identify rows.

Parameters

string $column_id

Return Value

void

in Columns at line 154
Columns hideOnMobile(bool $bool)

Hide this column on mobile devices.

Parameters

bool $bool

Return Value

Columns

in Columns at line 164
Columns showOnMobile(bool $bool = true)

Show this column only on mobile devices.

Parameters

bool $bool

Return Value

Columns

in Columns at line 176
Columns view(string $view)

Set a custom Blade view for rendering the column cell.

Parameters

string $view

Return Value

Columns

in Columns at line 187
Columns styling(string $classes)

Set CSS classes for the column's table cell (td).

Parameters

string $classes

Return Value

Columns

in Columns at line 197
Columns thStyling(string $classes)

Set CSS classes for the column's table header (th).

Parameters

string $classes

Return Value

Columns

in Columns at line 207
Columns thWrapperStyling(string $classes)

Set CSS classes for the column's header wrapper element.

Parameters

string $classes

Return Value

Columns

in Columns at line 217
Columns disableToggleWhen(Closure $function)

Set a closure that determines when the toggle should be disabled.

Parameters

Closure $function

Return Value

Columns

in Columns at line 227
Columns hideToggleWhen(Closure $function)

Set a closure that determines when the toggle should be hidden.

Parameters

Closure $function

Return Value

Columns

in Columns at line 237
Columns trigger(string $trigger)

Set the method name to call when a toggle column is toggled.

Parameters

string $trigger

Return Value

Columns

in Columns at line 247
Columns isBool()

Mark this column as a boolean column.

Return Value

Columns

in Columns at line 259
Columns trueIs(mixed $true)

Set the value that represents "true" for boolean columns.

Parameters

mixed $true

Return Value

Columns

in Columns at line 271
Columns trueLabel(string $string)

Set the display label/icon for the "true" state.

Parameters

string $string

Return Value

Columns

in Columns at line 283
Columns falseLabel(string $string)

Set the display label/icon for the "false" state.

Parameters

string $string

Return Value

Columns

in Columns at line 293
Columns toHtml()

Allow the column value to be rendered as raw HTML.

Return Value

Columns

in Columns at line 305
Columns text(string $text)

Set the display text for a link column.

Parameters

string $text

Return Value

Columns

in Columns at line 317
Columns href(Closure $function)

Set a closure that resolves the URL for a link column.

Parameters

Closure $function

Return Value

Columns

in Columns at line 329
Columns target(string $target)

Set the target attribute for a link column (e.g. '_blank').

Parameters

string $target

Return Value

Columns

in Columns at line 343
Columns popup(array $array = ['width' => 750, 'height' => 800])

Open the link in a popup window with the given dimensions.

Parameters

array $array

Return Value

Columns

in Columns at line 357
Columns classes(string $classes)

Set CSS classes for a link column's anchor tag.

Parameters

string $classes

Return Value

Columns

in Columns at line 369
Columns customData(Closure $function)

Set a closure to transform the column's display value.

Parameters

Closure $function

Return Value

Columns

in Columns at line 379
Columns hideWhen(bool $bool)

Conditionally hide the column and remove it from the column selector.

Parameters

bool $bool

Return Value

Columns

in Columns at line 392
Columns hideFromSelector(bool $bool)

Hide this column from the column toggle selector.

Parameters

bool $bool

Return Value

Columns

in Columns at line 402
Columns isVisible(bool $bool)

Set the column's initial visibility.

Parameters

bool $bool

Return Value

Columns

in Columns at line 412
Columns sortColumnBy(string $column)

Set an alternative column key to use when sorting this column.

Parameters

string $column

Return Value

Columns

at line 39
__construct(string $label, string|null $key = null)

Create a new LinkColumn instance.

Parameters

string $label
string|null $key

at line 47
static Column make(string $label, string|null $key = null)

Static factory method.

Parameters

string $label
string|null $key

Return Value

Column

in Column at line 125
Column collapseOnMobile(bool $bool = true)

Set the column to collapse on mobile devices.

Parameters

bool $bool

Return Value

Column

in Column at line 137
Column cardTitle(bool|callable $callback = true)

Set the column as the card title for mobile devices.

Parameters

bool|callable $callback

Return Value

Column

in Column at line 152
Column triggerCardInfoModal(bool $bool = true)

Toggle whether clicking the card title opens the info modal.

Parameters

bool $bool

Return Value

Column

in Column at line 162
Column showOnCard(bool $bool = true)

Toggle whether this column is displayed on mobile cards.

Parameters

bool $bool

Return Value

Column

in Column at line 174
Column sortable(bool|callable $callback = true)

Mark the column as sortable.

Parameters

bool|callable $callback

Return Value

Column

in Column at line 194
Column secondaryHeader(callable $callback)

Set a secondary header callback for this column.

The callback receives the current rows collection and should return the content to display in the secondary header cell.

Parameters

callable $callback

Return Value

Column

in Column at line 206
Column searchable(bool|callable $callback = true)

Mark the column as searchable.

Parameters

bool|callable $callback

Return Value

Column

in Column at line 225
Column editable(string $type = 'input', array $options = [], callable|null $onUpdate = null)

Mark the column as editable.

Parameters

string $type
array $options
callable|null $onUpdate

Return Value

Column

in Column at line 243
Column setUpdateField(string $field)

Set the database field to use when saving editable values.

Parameters

string $field

Return Value

Column

in Column at line 253
Column pushLeft()

Align the column content to the left.

Return Value

Column

in Column at line 267
Column pushRight()

Align the column content to the right.

Return Value

Column

in Column at line 281
Column centered()

Center the column content.

Return Value

Column

in Column at line 297
static void resetStaticKeys()

Reset the static key registry (used between test runs).

Return Value

void

in Column at line 305
protected string generateUniqueKey(string $label)

Generate a unique slug key from the column label.

Parameters

string $label

Return Value

string