searchable(), Column::make('Nomor Telepon', 'phone_number')->searchable(), Column::make('Jenis Kelamin', 'gender') ->format(fn ($value) => Blade::render( '' .$value->label() .'' )) ->html(), Column::make('Aksi') ->label(function ($row) { $actions = ''; if (auth()->user()->can('update customer')) { $actions .= view('components.datatables.edit-modal', [ 'id' => $row->hash, 'method' => 'update', 'modalTitle' => 'Ubah Customer', ])->render(); } if (auth()->user()->can('delete customer')) { $actions .= view('components.datatables.delete', [ 'id' => $row->hash, 'deleteRoute' => route('studio.loyalty.customer.delete', $row->hash), ])->render(); } return $actions; }) ->html(), ]; } public function builder(): Builder { return Customer::select('id', 'name', 'phone_number', 'gender'); } }