searchable()->sortable(), Column::make('Aksi') ->label(function ($row) { $actions = ''; if (auth()->user()->can('show warehouse')) { $actions .= view('components.actions.table.show', [ 'showRoute' => route('studio.master.warehouse.show', $row->hash), ])->render(); } if (auth()->user()->can('update warehouse')) { $actions .= view('components.actions.table.edit-modal', [ 'id' => $row->hash, 'method' => 'update', 'modalTitle' => 'Ubah Gudang', ])->render(); } if (auth()->user()->can('delete warehouse')) { $actions .= view('components.actions.table.delete', [ 'id' => $row->hash, ])->render(); } return $actions; }) ->html() ->hideIf(auth()->user()->cannot('show warehouse') && auth()->user()->cannot('update warehouse') && auth()->user()->cannot('delete warehouse')), ]; } public function builder(): Builder { return Warehouse::select('id', 'name'); } }