當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Department::select方法代碼示例

本文整理匯總了PHP中Department::select方法的典型用法代碼示例。如果您正苦於以下問題:PHP Department::select方法的具體用法?PHP Department::select怎麽用?PHP Department::select使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Department的用法示例。


在下文中一共展示了Department::select方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: overview

 public function overview()
 {
     $departments = Department::select('id', 'name', 'icon')->where('hospital_id', $this->hospital_id)->get();
     if ($departments) {
         $this->set_template('hospital.department.overview');
         $this->set_data(array('departments' => $departments));
     } else {
         $this->set_error_code($this->not_found_error_code);
     }
     return $this->response();
 }
開發者ID:Jv-Juven,項目名稱:hospital-register-system,代碼行數:11,代碼來源:DepartmentController.php

示例2: getCollPrograms

 public static function getCollPrograms($collegeid)
 {
     $departments = Department::select('unitid')->where('parentunitid', $collegeid)->groupBy('unitid')->get();
     $departmentids = [];
     foreach ($departments as $department) {
         array_push($departmentids, $department->unitid);
     }
     $programs = Program::select('programid')->whereIn('unitid', $departmentids)->where('degreelevel', 'U')->groupBy('programid')->get();
     $programids = [];
     foreach ($programs as $program) {
         array_push($programids, $program->programid);
     }
     return $programids;
 }
開發者ID:jpcamba,項目名稱:attrition,代碼行數:14,代碼來源:Studentdelayed.php

示例3: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     $batches = [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009];
     $allStudents = [];
     $departments = Department::select('unitid')->get();
     foreach ($departments as $department) {
         $departmentid = $department->unitid;
         foreach ($batches as $batch) {
             $allStudents[$batch] = Studentterm::getBatchStudentsDepartment($batch * 100000, $departmentid);
         }
         $this->seedEmployment($batches, $allStudents, $departmentid);
         $this->seedGrades($batches, $allStudents, $departmentid);
         $this->seedStbracket($batches, $allStudents, $departmentid);
         $this->seedRegion($batches, $allStudents, $departmentid);
         $this->seedUnemployment($batches, $allStudents, $departmentid);
         $this->seedHighGrades($batches, $allStudents, $departmentid);
         $this->seedOverload($batches, $allStudents, $departmentid);
         $this->seedUnits($batches, $allStudents, $departmentid);
     }
 }
開發者ID:jpcamba,項目名稱:attrition,代碼行數:25,代碼來源:2016_04_06_154231_add_department_entries_to_correlations_table.php

示例4: department

 public function department()
 {
     $pages = Department::select(array('id_dept', 'nm_dept'));
     return Datatables::of($pages)->make();
 }
開發者ID:shimohira,項目名稱:supplier,代碼行數:5,代碼來源:dataTableController.php


注:本文中的Department::select方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。