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


PHP Proveedor::create方法代码示例

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


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

示例1: addAction

 public function addAction()
 {
     $this->addForm = new ProveedorForm();
     $object;
     if ($this->addForm->isPosted()) {
         $xi = 0;
         //while($xi<3){
         if ($this->addForm->isValidForAdd($xi)) {
             if (Input::get($this->FieldsCreate['4']['name'] . $xi) == true) {
                 //disponible
                 $disponiblechk = Input::get($this->FieldsCreate['4']['name'] . $xi);
             } else {
                 $disponiblechk = false;
             }
             $object = Proveedor::create([$this->FieldsName['1'] => Input::get($this->FieldsCreate['1']['name'] . $xi), $this->FieldsName['2'] => Input::get($this->FieldsCreate['2']['name'] . $xi), $this->FieldsName['3'] => Input::get($this->FieldsCreate['3']['name'] . $xi), $this->FieldsName['4'] => $disponiblechk]);
             return Redirect::route($this->routeIndex);
         } else {
         }
         //$xi++;
         //}
         return Redirect::route($this->routeAdd)->withInput(["errors" => $this->addForm->getErrors()]);
         //return Redirect::route($this->routeAdd)->withInput(Input::all());
         //}
     }
     $this->addrow = $this->addrowAction();
     return View::make($this->routeAdd, ["form" => $this->addForm, "row" => $this->addrow, "FieldsCreate" => $this->FieldsCreate, "module" => $this->module, "key" => $this->key]);
 }
开发者ID:alejandromorg,项目名称:Inventario,代码行数:27,代码来源:ProveedorController.php

示例2: run

 public function run()
 {
     $object = [["NOMBRE" => "PROVEEDOR1", "RANKING" => "55", "DESCRIPCION" => "DIRECCION: Tr 12 # 15-12, TEL 2355555, EMAIL: al55@gmail.de "], ["NOMBRE" => "PROVEEDOR2", "RANKING" => "12", "DESCRIPCION" => "DIRECCION: Tr 25 # 15-25, TEL 2252525, EMAIL: qwe25@gmail.de "], ["NOMBRE" => "PROVEEDOR25", "RANKING" => "65", "DESCRIPCION" => "1DIRECCION: Tr 34 # 15, TEL 2324456, EMAIL: wer5@gmail.de "], ["NOMBRE" => "PROVEEDOR40", "RANKING" => "99", "DESCRIPCION" => "1DIRECCION: Tr 34 # 15, TEL 2324456, EMAIL: dfg56l@gmail.de "]];
     DB::unprepared('ALTER TABLE ' . $this->table . ' AUTO_INCREMENT = 1');
     foreach ($object as $detail) {
         Proveedor::create($detail);
     }
 }
开发者ID:alejandromorg,项目名称:Inventario,代码行数:8,代码来源:ProveedorSeeder.php


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