livewire-datatables
livewire-datatables copied to clipboard
'searchable()' for complex 'Coloumn::callback' functions.
I am using these queries. But searchable is not working. Can I see examples or docs?
Column::callback(['id', 'brand'], function ($id) {
$file = File::findOrFail($id);
return $file->brand.' '.$file->engine.' '.$file->vehicle()->TORQUE_standard;
})->label('Vehicle')->searchable(),
Column::callback('stages', function($stages){
if(\App\Models\Service::where('name', $stages)->first()){
return '<img alt="{{$file->stages}}" width="33" height="33" data-src-retina="'. url("icons").'/'.\App\Models\Service::where('name', $stages)->first()->icon .'" data-src="'.url('icons').'/'.\App\Models\Service::where('name', $stages)->first()->icon.'" src="'.url('icons').'/'.\App\Models\Service::where('name', $stages)->first()->icon.'">
<span class="text-black" style="top: 2px; position:relative;">'.$stages.'</span>';
}
})
->label('Stage')->searchable(),