public static function getAllSpeciality() { $specialities = Speciality::select()->where('USE', '=', 1)->get(); foreach ($specialities as $speciality) { $speciality->SPECIALITYCODE = Recoding::winToUtf($speciality->SPECIALITY) . " ( " . $speciality->CODE . " )"; } return $specialities; }
/** * Show a list * * @return Datatables JSON */ public function data() { $subjects = Speciality::all(['SPECIALITY', 'SPECIALITYID']); foreach ($subjects as $subject) { $subject->SPECIALITY = iconv("windows-1251", "utf-8", $subject->SPECIALITY); } return Datatables::of($subjects)->make(); }