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


PHP Position::select方法代码示例

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


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

示例1: getEdit

 public function getEdit($id = false)
 {
     if (!$id) {
         return App::abort(404);
     }
     $item = Position::find($id);
     if (!$item) {
         return App::abort(404);
     }
     $departments = Department::whereNotNull("parent_id")->orderBy("name")->get();
     $roles = Positionrole::orderBy("name")->get();
     $positions = Position::select(["positions.id", "positions.name", "departments.name as department_name"])->leftjoin("departments", "departments.id", "=", "positions.department_id")->where("positions.id", "<>", $id)->orderBy("departments.name")->orderBy("positions.name")->take(100)->get();
     $workshifts = Workshift::all();
     $content = View::make("positions/edit", ["roles" => $roles, "positions" => $positions, "departments" => $departments, "item" => $item, "workshifts" => $workshifts]);
     return View::make("common/tpl", array("template" => $content));
 }
开发者ID:nix222,项目名称:crm-system,代码行数:16,代码来源:PositionsController.php

示例2: getEdit

 /**
  * User edit form
  * 
  * @param int $id
  * @return \View
  */
 public function getEdit($id = false)
 {
     if (!$id) {
         return App::abort(404);
     }
     $item = User::find($id);
     if (!$item) {
         return App::abort(404);
     }
     Orchestra\Asset::add("jquery-ui", "assets/js/ui/js/jquery-ui-1.10.3.custom.min.js");
     Orchestra\Asset::add("jquery-ui", "assets/js/ui/css/hot-sneaks/jquery-ui-1.10.3.custom.min.css");
     Orchestra\Asset::add("mask", "assets/js/mask.js");
     $positions = Position::select(["positions.id", "positions.name", "departments.name as department_name"])->leftjoin("departments", "departments.id", "=", "positions.department_id")->orderBy("departments.name")->orderBy("positions.name")->get();
     $content = View::make("users/edit", ["positions" => $positions, "item" => $item]);
     return View::make("common/tpl", array("template" => $content));
 }
开发者ID:nix222,项目名称:crm-system,代码行数:22,代码来源:UsersController.php

示例3: getStepedit

 public function getStepedit($id = false)
 {
     if (!$id) {
         return App::abort(404);
     }
     $item = Businesslogicstep::find($id);
     if (!$item) {
         return App::abort(404);
     }
     $positions = Position::select(["positions.id", "positions.name", "departments.name as department_name"])->leftjoin("departments", "departments.id", "=", "positions.department_id")->orderBy("departments.name")->orderBy("positions.name")->take(100)->get();
     $content = View::make("tasks/blogic/step_edit", ["item" => $item, "blogic" => $item->logic, "positions" => $positions]);
     return View::make("common/tpl", array("template" => $content));
 }
开发者ID:nix222,项目名称:crm-system,代码行数:13,代码来源:TaskLogics.php


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