Пример #1
0
 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;
 }
Пример #2
0
 /**
  * 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();
 }