本文整理汇总了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();
}
}
示例2: index
public function index()
{
$arg = array('departs' => Depart::all(), 'stores' => Store::all());
return View::make('foodorder/open', $arg);
}
示例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()]);
}
示例4: getAll
/**
* show list of all stores
*
* @return \Illuminate\View\View
*/
public function getAll()
{
return View::make('store.all', ['stores' => Store::all()]);
}
示例5: all
public function all()
{
$stores = Store::all();
return $stores;
}
示例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);
}
示例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]);
}