Skip to profile content
Hi @johnny, Thank you for your respons, I try your example but still not working, except I add the “display:block” in “style” like this :: $crud->callbackColumn('credit', function ($value) { if (!empty($value)) return "<span style=\"text-align:right;display:block;width:100px;\">".($value < 0 ? n…
Hi @johnny and @all, please help how to set content of column to align right … I have tried like this but it doesn’t work $crud->callbackColumn('amount', function ($value) { if (!empty($value)) return "<span style=\"text-align:right\">".$value."</span>"; }); Thank you in advance dodo
hello @nasrul $crud->callbackColumn('tanggal_pembelian', function ($value, $row) { if (!empty($value)) return convertYmdToDmy($row->tanggal_pembelian); }); my helper function :: if (! function_exists('convertYmdToDmy')) { function convertYmdToDmy($date) { retur…
$crud->setRelation(‘user_id’, ‘presensi_emp’, ‘nama’,“presensi_emp.user_id in (‘152’,‘69’)”); maybe you miss a bracket, maybe become like this $crud->setRelation( 'user_id', 'presensi_emp', 'nama', ['`presensi_emp.user_id` in ?' => '("152","69")'] ); hope this help regards, dodo
also i noticed that you call PHP file on URL … can i call other function on the same file or i have to put detail crud on separate file? You can call functions in the same file (same controller) as long as the function is in the route list [image] [image] [image] I hope this helps Regards…