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


PHP Store::all方法代码示例

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


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

示例1: reset

 public function reset()
 {
     $stores = StoreModel::all();
     foreach ($stores as $store) {
         $status = $store->status;
         $startNo = rand(1, 100);
         $status->current_queue_no = $startNo;
         $status->last_queue_no = $startNo;
         $status->save();
     }
 }
开发者ID:victory21th,项目名称:QM-Laravel,代码行数:11,代码来源:StatusController.php

示例2: index

 public function index()
 {
     $arg = array('departs' => Depart::all(), 'stores' => Store::all());
     return View::make('foodorder/open', $arg);
 }
开发者ID:rainbowfart,项目名称:foodorder,代码行数:5,代码来源:OpenController.php

示例3: getOverviewOfActive

 /**
  * Display a listing of all active deliveries.
  *
  * @return Response
  */
 public function getOverviewOfActive()
 {
     return View::make('delivery.active', ['activeDeliveries' => Delivery::active()->get()->sortBy('closing_time'), 'now' => $this->getDateTimeAfterNow(10)->format('Y-m-d H:i:s'), 'stores' => Store::all()]);
 }
开发者ID:fashionforhome,项目名称:fressen4home,代码行数:9,代码来源:DeliveryController.php

示例4: getAll

 /**
  * show list of all stores
  *
  * @return \Illuminate\View\View
  */
 public function getAll()
 {
     return View::make('store.all', ['stores' => Store::all()]);
 }
开发者ID:fashionforhome,项目名称:fressen4home,代码行数:9,代码来源:StoreController.php

示例5: all

 public function all()
 {
     $stores = Store::all();
     return $stores;
 }
开发者ID:softwareDiaz,项目名称:prueba,代码行数:5,代码来源:UserRepo.php

示例6: edit_product

 public function edit_product()
 {
     $id = Request::segment(4) ? Request::segment(4) : 0;
     $sub_title = Request::segment(4) ? "Edit Product" : "Add Product";
     $product = Product::find($id);
     $brands = Brand::all();
     $stores = Store::all();
     $selected_store_id = 0;
     $selected_department_id = 0;
     $selected_shelf_id = 0;
     foreach ($stores as $store) {
         $selected_store_id = $store->id;
         break;
     }
     if ($product && $product->store_id) {
         $selected_store_id = $product->store_id;
     }
     $departments = Department::where('store_id', $selected_store_id)->get();
     foreach ($departments as $department) {
         $selected_department_id = $department->id;
         break;
     }
     if ($product && $product->department_id) {
         $selected_department_id = $product->department_id;
     }
     $shelves = Shelf::where('department_id', $selected_department_id)->get();
     foreach ($shelves as $shelf) {
         $selected_shelf_id = $shelf->id;
         break;
     }
     return View::make('admin.product_form')->with('title', 'Product')->with('sub_title', $sub_title)->with('product', $product)->with('brands', $brands)->with('stores', $stores)->with('departments', $departments)->with('shelves', $shelves)->with('selected_store_id', $selected_store_id)->with('selected_department_id', $selected_department_id)->with('selected_shelf_id', $selected_shelf_id);
 }
开发者ID:sohelrana820,项目名称:mario-gomez,代码行数:32,代码来源:AdminController.php

示例7: getStatistics

 /**
  * user statistics
  *
  * @return \Illuminate\View\View
  */
 public function getStatistics()
 {
     $user = Auth::user();
     // favorite stores
     $allStores = Store::all();
     $favoriteStoresBySpending = $allStores->sortByDesc(function ($store) use($user) {
         return $store->spendByUser($user);
     })->take(5);
     $favoriteStoresByOrderCount = $allStores->sortByDesc(function ($store) use($user) {
         return $store->ordersByUser($user);
     })->take(5);
     return View::make('user.statistics', ['favoriteStoresBySpending' => $favoriteStoresBySpending, 'favoriteStoresByOrderCount' => $favoriteStoresByOrderCount]);
 }
开发者ID:fashionforhome,项目名称:fressen4home,代码行数:18,代码来源:UserController.php


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