本文整理汇总了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]);
}