You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have index and id columns. I need to modify index column contents to become button link using index value. I need to modify it using render option in blade. Any way to do it in controller?
Code snippet of problem
I need something like this
$result = DB::select('SELECT id, a, b, c FROM my_tables');
$dt = $dataTables->make($result)
->addIndexColumn(
modify to <a href='mylink' class='btn-primary'>index value</a>
)
->rawColumns(['detail'])
->toJson();
I can do it in blade like this but I prefer to do it in controller like above.
Summary of problem or feature request
I have index and id columns. I need to modify index column contents to become button link using index value. I need to modify it using render option in blade. Any way to do it in controller?
Code snippet of problem
I need something like this
I can do it in blade like this but I prefer to do it in controller like above.
For additional info, mylink contains value from another column in same table.
System details
The text was updated successfully, but these errors were encountered: