Toggle Columns
Disabling Column Toggling
By default, all columns are toggleable by the user. You can disable column toggling by passing the toggleable
argument to the column's make()
method:
php
TextColumn::make('name', toggleable: false);
Alternatively, you may use the toggleable()
and notToggleable()
methods:
php
TextColumn::make('name')->toggleable();
TextColumn::make('name')->notToggleable();
Hide Columns by Default
You can hide columns by default by passing the visible
argument to the column's make()
method:
php
TextColumn::make('name', visible: false);
Alternatively, you may use the visible()
and hidden()
methods:
php
TextColumn::make('name')->visible(false);
TextColumn::make('name')->hidden();