本文整理匯總了PHP中Warehouse::all方法的典型用法代碼示例。如果您正苦於以下問題:PHP Warehouse::all方法的具體用法?PHP Warehouse::all怎麽用?PHP Warehouse::all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Warehouse
的用法示例。
在下文中一共展示了Warehouse::all方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getWarehouseAll
public function getWarehouseAll()
{
return View::make('goods.warehouse-all')->with('warehouse', Warehouse::all())->with('count', Warehouse::count());
}
示例2: getPrint
public function getPrint()
{
$warehouse = Warehouse::all();
$users = User::where('grade', '10')->where('disable', '0')->get();
$warehouse_name = '';
$user_name = '';
$prints = array();
$count_prints = 0;
$warehouse_id = Input::get('warehouse_id');
$user_id = Input::get('user_id');
if ($warehouse_id === '0' || $user_id === '0') {
return Redirect::to('picking/print')->with('error', '倉庫和業務員都需要選擇!');
}
if ($warehouse_id && $user_id) {
$warehouse_name = Warehouse::find($warehouse_id)->pluck('name');
$user = User::find($user_id);
$user_name = $user->username;
$prints = Delivery::where('warehouse_id', $warehouse_id)->where('status', '2')->where('user_id', $user_id)->with('items', 'user')->get();
$count_prints = count($prints);
}
return View::make('picking.print')->with(compact('warehouse'))->with(compact('users'))->with(compact('prints'))->with(compact('warehouse_name'))->with(compact('user_name'))->with(compact('count_prints'));
}
示例3: getRecoverEmptyWarehouse
public function getRecoverEmptyWarehouse($goodEmptyId)
{
$good_empty = GoodEmpty::find($goodEmptyId);
$branch = Branch::find($good_empty->branch_id);
$warehouse = Warehouse::all();
return View::make('branch.recover-empty-warehouse')->with(compact('warehouse'))->with(compact('branch'))->with(compact('good_empty'));
}
示例4: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
//
$warehouses = Warehouse::all();
return View::make('warehouse.warehouse', ['warehouses' => $warehouses]);
}