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


PHP Items::where方法代码示例

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


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

示例1: postClear

 public function postClear()
 {
     $clear = Input::get('clear');
     // make sure submit was clicked
     if (!empty($clear)) {
         $items = Items::where('completed', 1)->delete();
     }
     return Redirect::route('home');
 }
开发者ID:kruzerdesigns,项目名称:ToDo,代码行数:9,代码来源:HomeController.php

示例2: getProcesePurchase

 public function getProcesePurchase($id)
 {
     $title = "Metodo de pago | Nia Boutique.com";
     $fac = Facturas::find($id);
     $x = FacturaItem::where('factura_id', '=', $id)->sum('item_qty');
     $aux = FacturaItem::where('factura_id', '=', $id)->get(array('item_id', 'item_qty', 'item_talla', 'item_color', 'item_precio'));
     $i = 0;
     $auxT = 0;
     $auxQ = 0;
     $p = '';
     foreach ($aux as $a) {
         $b = Items::where('item.id', '=', $a->item_id)->first();
         $p = $p . $b->item_nomb . ', ';
         $b->qty = $a->item_qty;
         $b->precio = $a->item_precio;
         $b->item_talla = Tallas::where('id', '=', $a->item_talla)->pluck('talla_desc');
         $b->item_color = Colores::where('id', '=', $a->item_color)->pluck('color_desc');
         $auxT = $auxT + $b->qty * $b->item_precio;
         $auxQ = $auxQ + $b->qty;
         $aux = Misc::where('item_id', '=', $a->item_id)->where('deleted', '=', 0)->first();
         $b->img = Images::where('misc_id', '=', $aux->id)->where('deleted', '=', 0)->first();
         $item[$i] = $b;
         $i++;
     }
     $total = 0;
     $method = 'hola';
     $bancos = Bancos::where('deleted', '=', 0)->get();
     return View::make('indexs.showCart')->with('title', $title)->with('method', $method)->with('total', $total)->with('items', $item)->with('id', $id)->with('bancos', $bancos);
 }
开发者ID:bakuryuthem0,项目名称:nia,代码行数:29,代码来源:ItemController.php

示例3: getShowItem

 public function getShowItem($id)
 {
     $art = Items::where('item.id', '=', $id)->first(array('item.*'));
     $a = new stdClass();
     $a->id = $art->id;
     $a->item_nomb = $art->item_nomb;
     $a->item_desc = $art->item_desc;
     $a->item_cod = $art->item_cod;
     $a->item_precio = $art->item_precio;
     if (!is_null($art->percent)) {
         $a->percent = $art->percent;
     }
     $a->misc = array();
     $a->tallas = array();
     $a->colores = array();
     //$misc    			= Misc::where('item_id','=',$art->id)->first();
     $misc = Misc::where('item_id', '=', $art->id)->get();
     $aux = array();
     $i = 0;
     foreach ($misc as $m) {
         $aux[$i] = Images::where('misc_id', '=', $m->id)->where('deleted', '=', 0)->get();
         $i++;
     }
     $a->images = $aux;
     $t = Misc::where('item_id', '=', $art->id)->groupBy('item_talla')->get(array('item_talla'));
     $c = Misc::where('item_id', '=', $art->id)->get(array('item_color', 'item_talla'));
     $a->tallas = $t;
     $a->colores = $c;
     $tallas = Tallas::get();
     $colores = Colores::get();
     $title = $art->item_nomb;
     if (Auth::check() && Auth::user()->role == 1) {
         $layout = 'admin';
     } else {
         $layout = 'default';
     }
     $option = array();
     $tallas = Tallas::get();
     $colores = Colores::get();
     return View::make('indexs.artSelf')->with('title', $title)->with('art', $a)->with('layout', $layout)->with('tallas', $tallas)->with('colores', $colores);
 }
开发者ID:bakuryuthem0,项目名称:nia,代码行数:41,代码来源:HomeController.php

示例4: postAddDelItemProm

 public function postAddDelItemProm()
 {
     $id = Input::get('id');
     $val = Input::get('val');
     $item = Items::where('id', '=', $id)->first();
     $item->item_prom = $val;
     if ($item->save()) {
         return Response::json(array('type' => 'success', 'msg' => 'Articulo agregado satisfactoriamente.'));
     } else {
         return Response::json(array('type' => 'danger', 'msg' => 'Error al agregar el articulo.'));
     }
 }
开发者ID:bakuryuthem0,项目名称:nia,代码行数:12,代码来源:AdminController.php


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