transformDatatables($array); } public function transformStatuslabel (Statuslabel $statuslabel) { $array = [ 'id' => e($statuslabel->id), 'name' => e($statuslabel->name), 'type' => $statuslabel->getStatuslabelType(), 'color' => e($statuslabel->color), 'show_in_nav' => ($statuslabel->show_in_nav=='1') ? true : false, 'created_at' => $statuslabel->created_at, 'updated_at' => $statuslabel->updated_at, ]; return $array; } public function transformStatuslabelsDatatable($users) { return (new DatatablesTransformer)->transformDatatables($users); } }