Closed sergeynilov closed 1 year ago
You can use a closure that then builds your desired html or use a view:
->editColumn('action', function($user) {
if ($user->active) {
$action = 'active_html';
}
return $action;
})
Or if you prefer a polymorphic view:
->editColumn('action', function($user) {
return view('users.actions.' . $user->status, compact('user'));
})
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been inactive for 7 days since being marked as stale.
Hallo, In laravel 5.8 app I use yajra/laravel-datatables-oracle": "~8.0 and I need to show in 1 action 2 or 1 buttons, depending of status field value. 2) I define 2 buttons in my control :
and I need to show/hide "Fees" depending on $status value. Is there is such a way?
2) I can create 2 actions with different names, but again I did not find a way depending on $status value. Is it possible and if yes how?
Thanks!