当前位置: 首页>>代码示例>>PHP>>正文


PHP Department::lists方法代码示例

本文整理汇总了PHP中Department::lists方法的典型用法代码示例。如果您正苦于以下问题:PHP Department::lists方法的具体用法?PHP Department::lists怎么用?PHP Department::lists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Department的用法示例。


在下文中一共展示了Department::lists方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: doChooseEmployee

 /**
  * User chose single employee from dropdown to be edited
  *
  * @return mixed
  */
 public function doChooseEmployee()
 {
     $employee = Employee::find(Input::get('choose'));
     $dept = ['' => 'Choose...'] + Department::lists('name', 'id');
     $location = ['' => 'Choose...'] + Location::lists('name', 'id');
     return View::make('admin.edit-employee', compact('dept', 'location', 'employee'));
 }
开发者ID:heidilux,项目名称:Company-Directory-L4,代码行数:12,代码来源:AdminController.php

示例2: index

 /**
  * Display a listing of the resource.
  * GET /sppb
  *
  * @return Response
  */
 public function index()
 {
     $query = DB::table('SPPB')->select('no_SPPB')->orderBy('no_SPPB', 'desc')->first();
     $inisial = 'SPB';
     if (!isset($query)) {
         $kd = $inisial . '001';
     } else {
         $kode = substr($query->no_SPPB, 3);
         $kode = $kode + 1;
         if ($kode > 0) {
             $kd = $inisial . '00' . $kode;
             if ($kode > 9) {
                 $kd = $inisial . '0' . $kode;
                 if ($kode > 99) {
                     $kd = $inisial . $kode;
                 }
             }
         }
     }
     $data = array('department' => Department::lists('nm_dept', 'id_dept'), 'noSPPB' => $kd);
     return View::make('transaksi.SPPB', $data);
 }
开发者ID:shimohira,项目名称:supplier,代码行数:28,代码来源:SPPBController.php

示例3: Project

require 'model/professor.php';
$professor = new Project();
$app->get('/professors', function () {
    global $professor, $conn, $app;
    $query = $app->request()->params('query');
    echo json_encode($professor->show($conn, $query));
    // echo $condition;
});
/**
 * Department
 */
require 'model/department.php';
$department = new Department();
$app->get('/departments/list', function () {
    global $department, $conn;
    echo json_encode($department->lists($conn));
});
/**
 * Sponsor
 */
require 'model/sponsor.php';
$sponsor = new Sponsor();
$app->get('/sponsors', function () {
    global $sponsor, $conn, $app;
    $query = $app->request()->params('query');
    echo json_encode($sponsor->show($conn, $query));
});
$app->get('/sponsors/list', function () {
    global $sponsor, $conn;
    echo json_encode($sponsor->lists($conn));
});
开发者ID:auphone,项目名称:cityu-ads,代码行数:31,代码来源:index.php


注:本文中的Department::lists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。