本文整理汇总了PHP中app\Item::byType方法的典型用法代码示例。如果您正苦于以下问题:PHP Item::byType方法的具体用法?PHP Item::byType怎么用?PHP Item::byType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Item
的用法示例。
在下文中一共展示了Item::byType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$this->view_data['pessengers'] = Config::get('constants.pessengers');
$this->view_data['quantities'] = Config::get('constants.quantity');
$this->view_data['floors'] = Config::get('constants.floors');
$this->view_data['elevators'] = Config::get('constants.elevators');
$this->view_data['items_1']['name'] = "Small goods (one person moveable)";
$this->view_data['items_1']['list'] = Item::byType(1)->active()->orderBy('number_in_row')->get();
$this->view_data['items_2']['name'] = "Larger goods (two person moveable)";
$this->view_data['items_2']['list'] = Item::byType(2)->active()->orderBy('number_in_row')->get();
$this->view_data['items_3']['name'] = "Goods that need to be dissemble and assemble";
$this->view_data['items_3']['list'] = Item::byType(3)->active()->orderBy('number_in_row')->get();
return view($this->view_data['view_path_root'] . '.index', $this->view_data);
}