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


PHP Area::all方法代码示例

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


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

示例1: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     if (Auth::check()) {
         $data["inside_url"] = Config::get('app.inside_url');
         $data["user"] = Session::get('user');
         // Verifico si el usuario es un Webmaster
         if ($data["user"]->idrol == 1 || $data["user"]->idrol == 2 || $data["user"]->idrol == 3 || $data["user"]->idrol == 4 || $data["user"]->idrol == 7 || $data["user"]->idrol == 9 || $data["user"]->idrol == 10 || $data["user"]->idrol == 11 || $data["user"]->idrol == 12) {
             $data["search_nombre"] = null;
             $data["search_tipo"] = null;
             $data["search_modalidad"] = null;
             $data["search_servicio_clinico"] = null;
             $data["search_departamento"] = null;
             $data["search_responsable"] = null;
             $data["tipos"] = RHTipo::all()->lists('nombre', 'id');
             $data["modalidades"] = RHModalidad::all()->lists('nombre', 'id');
             $data["servicios"] = Servicio::all()->lists('nombre', 'idservicio');
             $data["departamentos"] = Area::all()->lists('nombre', 'idarea');
             $data["usuarios"] = User::orderBy('nombre')->get()->lists('UserFullName', 'id');
             //WIP DEBE SER PRESUPUESTO CAPACITACION
             $data["proyectos_data"] = PresupuestoCapacitacion::withTrashed()->paginate(10);
             return View::make('rrhh.presupuesto_capacitacion.index', $data);
         } else {
             return View::make('error/error', $data);
         }
     } else {
         return View::make('error/error', $data);
     }
 }
开发者ID:ktakayama91,项目名称:GTSlaravel,代码行数:33,代码来源:PresupuestoCapacitacionController.php

示例2: search

 /**
  * Display a listing of the searched resource.
  *
  * @return Response
  */
 public function search()
 {
     if (Auth::check()) {
         $data["inside_url"] = Config::get('app.inside_url');
         $data["user"] = Session::get('user');
         // Verifico si el usuario es un Webmaster
         if ($data["user"]->idrol == 1 || $data["user"]->idrol == 2 || $data["user"]->idrol == 3 || $data["user"]->idrol == 4 || $data["user"]->idrol == 7 || $data["user"]->idrol == 9 || $data["user"]->idrol == 10 || $data["user"]->idrol == 11 || $data["user"]->idrol == 12) {
             $data["search_nombre"] = Input::get('search_nombre');
             $data["search_servicio_clinico"] = Input::get('search_servicio_clinico');
             $data["search_departamento"] = Input::get('search_departamento');
             $data["search_responsable"] = Input::get('search_responsable');
             $data["search_fecha_ini"] = Input::get('search_fecha_ini');
             $data["search_fecha_fin"] = Input::get('search_fecha_fin');
             $data["servicios"] = Servicio::all()->lists('nombre', 'idservicio');
             $data["departamentos"] = Area::all()->lists('nombre', 'idarea');
             $data["usuarios"] = User::orderBy('nombre')->get()->lists('UserFullName', 'id');
             $data["reportes_data"] = PlanAprendizaje::searchReporte($data['search_nombre'], $data['search_servicio_clinico'], $data['search_departamento'], $data['search_responsable'], $data["search_fecha_ini"], $data["search_fecha_fin"]);
             $data["reportes_data"] = $data["reportes_data"]->paginate(10);
             return View::make('investigacion.proyecto.plan_aprendizaje.index', $data);
         } else {
             return View::make('error/error', $data);
         }
     } else {
         return View::make('error/error', $data);
     }
 }
开发者ID:ktakayama91,项目名称:GTSlaravel,代码行数:31,代码来源:PlanAprendizajeController.php

示例3: index

 /**
  * Display a listing of areas
  *
  * @return Response
  */
 public function index()
 {
     $areas = Area::all();
     if (!$areas) {
         return Response::json(['error' => true, 'message' => 'No areas added yet'], 400);
     }
     return Response::json(['error' => false, 'data' => $areas->toArray()], 200);
 }
开发者ID:koenhendriks,项目名称:Gora,代码行数:13,代码来源:AreasController.php

示例4: create

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     //
     $newId = Supplier::generateId();
     $areas = Area::all();
     $regions = Region::all();
     return View::make('supplier.new', ['id' => $newId, 'areas' => $areas, 'regions' => $regions]);
 }
开发者ID:NathanaelFebrianto,项目名称:Citramas,代码行数:13,代码来源:SupplierController.php

示例5: create

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     //
     $newId = Warehouse::generateId();
     $areas = Area::all();
     $regions = Region::all();
     return View::make('warehouse.new', ['id' => $newId, 'areas' => $areas, 'regions' => $regions]);
 }
开发者ID:NathanaelFebrianto,项目名称:Citramas,代码行数:13,代码来源:WarehouseController.php

示例6: get_areas

 public static function get_areas()
 {
     $respuesta = new stdClass();
     $respuesta->areas = Area::all();
     if (count($respuesta->areas) == 0) {
         $respuesta->result = false;
         $respuesta->mensaje = "No hay áreas registradas.";
     }
     return $respuesta;
 }
开发者ID:andreshg112,项目名称:ar-sac,代码行数:10,代码来源:AreaController.php

示例7: area

 public function area($city_id)
 {
     $this->noview();
     $data = array();
     $keyword = RequestMethods::get("keyword");
     $areas = Area::all(array("city_id = ?" => $city_id, "name LIKE ?" => "%{$keyword}%"), array("name", "id"));
     foreach ($areas as $a) {
         array_push($data, array("id" => $a->id, "name" => $a->name));
     }
     echo json_encode($data);
 }
开发者ID:HLitmus,项目名称:WebApp,代码行数:11,代码来源:home.php

示例8: getArea

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function getArea()
 {
     $areas = Area::all();
     $ret = array();
     $ret["incomplete_results"] = false;
     $items = array();
     foreach ($areas as $area) {
         if (strpos(strtolower($area->areaName), strtolower($_GET['q'])) !== false) {
             $row = array();
             $row["id"] = $area->areaID;
             $row["label"] = $area->areaName;
             array_push($items, $row);
         }
     }
     $ret["items"] = $items;
     $ret["total_count"] = count($items);
     echo json_encode($ret);
 }
开发者ID:NathanaelFebrianto,项目名称:Citramas,代码行数:23,代码来源:AutocompleteController.php

示例9: create

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     if (Auth::check()) {
         $data["inside_url"] = Config::get('app.inside_url');
         $data["user"] = Session::get('user');
         // Verifico si el usuario es un Webmaster
         if ($data["user"]->idrol == 1 || $data["user"]->idrol == 2 || $data["user"]->idrol == 3 || $data["user"]->idrol == 4) {
             $data["categorias"] = ProyectoCategoria::all()->lists('nombre', 'id');
             $data["servicios"] = Servicio::all()->lists('nombre', 'idservicio');
             $data["departamentos"] = Area::all()->lists('nombre', 'idarea');
             $data["usuarios"] = User::orderBy('nombre')->get()->lists('UserFullName', 'id');
             $data["tipos"] = [0 => "Seleccione", 1 => 'Clínico', 2 => 'Hospitalario'];
             return View::make('investigacion.requerimientos_clinicos.create', $data);
         } else {
             return View::make('error/error', $data);
         }
     } else {
         return View::make('error/error', $data);
     }
 }
开发者ID:ktakayama91,项目名称:GTSlaravel,代码行数:25,代码来源:RequerimientosClinicosController.php

示例10: dirname

include_once dirname(__FILE__) . '/../model/Area.class.php';
include_once dirname(__FILE__) . '/../model/Subarea.class.php';
include_once dirname(__FILE__) . '/../model/Participante.class.php';
include_once dirname(__FILE__) . '/../inc/helper.inc.php';
if (!recebendo_submissao_trabalhos()) {
    header("location: /" . $config['PATH'] . "/index.php?syserror=SUBMISSAO_TRABALHOS_ENCERRADA");
    exit;
}
session_start();
if (!isset($_SESSION['participante'])) {
    header("location: /" . $config['PATH'] . "/trabalhos/form_login.php?info=INSCRICAO_SUBMISSAO");
    exit;
}
$participante = $_SESSION['participante'];
$tipos = TipoTrabalho::all();
$areas = Area::all();
?>

<!DOCTYPE HTML>
<html lang="pt-br">
	<head>
		<?php 
include_once dirname(__FILE__) . '/../inc/head.inc.php';
?>
		<script type="text/javascript">
			jQuery(function($){
				$(".help-inline").hide();
				
				<?php 
if (isset($_GET['error'])) {
    ?>
开发者ID:jalerson,项目名称:expotec,代码行数:31,代码来源:form_submissao.php

示例11: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     if (Auth::check()) {
         $data["inside_url"] = Config::get('app.inside_url');
         $data["user"] = Session::get('user');
         // Verifico si el usuario es un Webmaster
         if ($data["user"]->idrol == 1 || $data["user"]->idrol == 2 || $data["user"]->idrol == 3 || $data["user"]->idrol == 4) {
             $data["categorias"] = ProyectoCategoria::all()->lists('nombre', 'id');
             $data["servicios"] = Servicio::all()->lists('nombre', 'idservicio');
             $data["departamentos"] = Area::all()->lists('nombre', 'idarea');
             $data["usuarios"] = User::orderBy('nombre')->get()->lists('UserFullName', 'id');
             $data["dimensiones"] = Dimension::all();
             $data["reporte"] = ReporteDesarrollo::find($id);
             //var_dump($data["reporte"]->indicador);
             $arreglo = [];
             foreach ($data["reporte"]->indicador as $indicador) {
                 if (isset($arreglo[$indicador->dimension_id])) {
                     array_push($arreglo[$indicador->dimension_id], $indicador);
                 } else {
                     $arreglo[$indicador->dimension_id] = [$indicador];
                 }
             }
             $data["indicadores"] = $arreglo;
             return View::make('investigacion.reportes.desarrollo.edit', $data);
         } else {
             return View::make('error/error', $data);
         }
     } else {
         return View::make('error/error', $data);
     }
 }
开发者ID:ktakayama91,项目名称:GTSlaravel,代码行数:37,代码来源:ReporteDesarrolloController.php

示例12: getEdit

 public function getEdit($BranchId)
 {
     // 区域
     //
     $area = Area::all();
     // 线路
     //
     $line = Line::all();
     // 客户类型
     //
     $type = Type::all();
     // 业务员
     //
     $users = User::where('grade', '10')->where('disable', '0')->get();
     return View::make('branch.edit')->with('branch', Branch::find($BranchId))->with(compact('area'))->with(compact('line'))->with(compact('type'))->with(compact('users'));
 }
开发者ID:huanghua581,项目名称:erp,代码行数:16,代码来源:BranchController.php

示例13: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     if (Auth::check()) {
         $data["inside_url"] = Config::get('app.inside_url');
         $data["user"] = Session::get('user');
         // Verifico si el usuario es un Webmaster
         if ($data["user"]->idrol == 1 || $data["user"]->idrol == 2 || $data["user"]->idrol == 3 || $data["user"]->idrol == 4) {
             $data["categorias"] = ProyectoCategoria::all()->lists('nombre', 'id');
             $data["servicios"] = Servicio::all()->lists('nombre', 'idservicio');
             $data["departamentos"] = Area::all()->lists('nombre', 'idarea');
             $data["usuarios"] = User::orderBy('nombre')->get()->lists('UserFullName', 'id');
             $data["reporte"] = ReporteFinanciamiento::find($id);
             return View::make('investigacion.reportes.financiamiento.edit', $data);
         } else {
             return View::make('error/error', $data);
         }
     } else {
         return View::make('error/error', $data);
     }
 }
开发者ID:ktakayama91,项目名称:GTSlaravel,代码行数:26,代码来源:ReporteFinanciamientoController.php

示例14: show

 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     if (Auth::check()) {
         $data["inside_url"] = Config::get('app.inside_url');
         $data["user"] = Session::get('user');
         // Verifico si el usuario es un Webmaster
         if ($data["user"]->idrol == 1 || $data["user"]->idrol == 2 || $data["user"]->idrol == 3 || $data["user"]->idrol == 4 || $data["user"]->idrol == 7 || $data["user"]->idrol == 9 || $data["user"]->idrol == 10 || $data["user"]->idrol == 11 || $data["user"]->idrol == 12) {
             $data["servicios"] = Servicio::all()->lists('nombre', 'idservicio');
             $data["departamentos"] = Area::all()->lists('nombre', 'idarea');
             $data["usuarios"] = User::orderBy('nombre')->get()->lists('UserFullName', 'id');
             $data["cronograma"] = TrabajoCronograma::find($id);
             return View::make('investigacion.trabajo.show', $data);
         } else {
             return View::make('error/error', $data);
         }
     } else {
         return View::make('error/error', $data);
     }
 }
开发者ID:ktakayama91,项目名称:GTSlaravel,代码行数:25,代码来源:TrabajoCronogramaController.php

示例15: update

 /**
  * @before _secure, _vendor
  */
 public function update($id)
 {
     $this->seo(array("title" => "Edit Lab", "view" => $this->getLayoutView()));
     $view = $this->getActionView();
     $centre = Centre::first(array("id = ?" => $id));
     if (RequestMethods::get("live")) {
         $centre->live = RequestMethods::get("live", 0);
         $centre->save();
         $this->redirect("/lab/manage");
     }
     $location = Location::first(array("id = ?" => $centre->location_id));
     $areas = Area::all(array("city_id = ?" => $location->city_id), array("name", "id"));
     $manager = User::first(array("id = ?" => $this->member->user_id));
     if (RequestMethods::post("action") == "medicallab") {
         $message = null;
         $location->street = RequestMethods::post("street");
         $location->area_id = RequestMethods::post("area_id");
         $location->city_id = RequestMethods::post("city_id");
         if ($location->validate()) {
             $location->save();
         } else {
             $message = "Center location was not saved!!";
         }
         $phone = RequestMethods::post("phone");
         if ($phone != $centre->phone) {
             $exist = Center::first(array("phone = ?" => $phone));
             if ($exist) {
                 $message = "Phone number already exists";
             } else {
                 $centre->phone = $phone;
                 $centre->save();
             }
         }
         if (!$message) {
             $message = "Lab info updated!!";
         }
         $view->set("message", $message);
     }
     if (RequestMethods::post("action") == "operations") {
         $operations = RequestMethods::post("operations");
         foreach ($operations as $key => $value) {
             $operation = Operation::first(array("centre_id = ?" => $id, "area_id = ?" => $value));
             if (!$operation) {
                 $operation = new Operation(array("user_id" => $this->user->id, "centre_id" => $id, "organization_id" => $this->organization->id, "area_id" => $value, "live" => 1));
                 $operation->save();
             }
         }
     }
     $ops = Operation::all(array("centre_id = ?" => $id), array("area_id"));
     $opa = array();
     foreach ($ops as $o) {
         $opa[] = $o->area_id;
     }
     $view->set("centre", $centre);
     $view->set("manager", $manager);
     $view->set("location", $location);
     $view->set("areas", $areas);
     $view->set("opa", $opa);
 }
开发者ID:HLitmus,项目名称:WebApp,代码行数:62,代码来源:lab.php


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