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


PHP Province::where方法代码示例

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


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

示例1: province

 public function province()
 {
     $result = Province::where('PAK_ID', Input::get('id'))->select('PROVINCE_ID', 'PROVINCE_NAME')->get();
     $dropdown = '<option value=""></option>';
     foreach ($result as $result) {
         $dropdown .= '<option value="' . $result->PROVINCE_ID . '">' . $result->PROVINCE_NAME . '</option>';
     }
     return Response::make($dropdown);
 }
开发者ID:terkmods,项目名称:CBT,代码行数:9,代码来源:BaseController.php

示例2: updatePosition

 function updatePosition()
 {
     $positionList = $this->input->post('positionList');
     $idList = $this->input->post('idList');
     $locations = new Province();
     for ($i = 0; $i < count($idList); $i++) {
         $locations->where("id", $idList[$i]);
         $locations->get();
         $locations->position = $positionList[$i];
         $locations->save();
         $locations->clear();
     }
     redirect("admin/locations/listAll/");
 }
开发者ID:lxthien,项目名称:batdongsan,代码行数:14,代码来源:locations.php

示例3: upload_pharmaceuticals_domains

 public function upload_pharmaceuticals_domains()
 {
     $pharmacist_domain_class = new PharmacistDomain();
     $input = Input::All();
     $header = array_shift($input);
     //retrieve header row
     $success = true;
     if (!$this->checkHeader($header, $pharmacist_domain_class->columns())) {
         $success = false;
         $response = "Cabeceras del Excel no coincide con la base de datos.\n                    No se procederá a modificar la base de datos.";
     }
     DB::table($pharmacist_domain_class->getTableName())->delete();
     foreach ($input as $row) {
         try {
             $row = $this->readRow($row, $header);
             $province = Province::where("description", "=", $row["province"])->first();
             $pharmacist_domain = new PharmacistDomain(array("domain" => $row["domain"], "province" => $province->description, "province_id" => $province->id));
             $pharmacist_domain->save();
         } catch (Exception $ex) {
             $success = false;
             $response = "Ha habido algún problema cargando el Excel en la base de datos." . "\n" . $ex->getMessage();
         }
     }
     if ($success) {
         $response = "Se ha cargado correctamente el Excel en la base de datos.";
     }
     return Response::json(array("success" => $success, "response" => $response));
 }
开发者ID:polo070770,项目名称:TFG,代码行数:28,代码来源:DomainController.php


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