當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。