searchable(), Column::make('Konten', 'content') ->searchable() ->format(fn ($value) => Str::limit($value, 50)), Column::make('Rating', 'rating') ->sortable(), Column::make('Visibilitas', 'is_show') ->label(fn ($row, $column) => Blade::render('', ['checked' => $row->is_show === IsShow::SHOW])) ->html(), ]; } public function toggleShow(Testimonial $testimonial): void { $testimonial->update([ 'is_show' => $testimonial->is_show === IsShow::SHOW ? IsShow::HIDDEN : IsShow::SHOW, ]); } public function builder(): Builder { return Testimonial::select('testimonials.id', 'rating', 'content', 'is_show', 'testimonials.created_at')->with(['user', 'user.customer']); } }