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