本文整理汇总了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();
}
示例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;
}
示例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();
}