本文整理汇总了PHP中app\Order::getTable方法的典型用法代码示例。如果您正苦于以下问题:PHP Order::getTable方法的具体用法?PHP Order::getTable怎么用?PHP Order::getTable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Order
的用法示例。
在下文中一共展示了Order::getTable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index(Request $request)
{
$order = new Order();
$builder = $order->newQuery()->with(['order_express'])->where('fid', $this->factory->getKey());
$pagesize = $request->input('pagesize') ?: config('site.pagesize.admin.' . $order->getTable(), $this->site['pagesize']['common']);
$base = boolval($request->input('base')) ?: false;
$this->_base = $base;
$this->_pagesize = $pagesize;
$this->_filters = $this->_getFilters($request, $builder);
$this->_table_data = $base ? $this->_getPaginate($request, $builder, ['*'], ['base' => $base]) : [];
return $this->view('factory-backend.express.' . ($base ? 'list' : 'datatable'));
}
示例2: export
public function export(Request $request)
{
$order = new Order();
$builder = $order->newQuery()->with('details');
$page = $request->input('page') ?: 0;
$pagesize = $request->input('pagesize') ?: config('site.pagesize.export', 1000);
$total = $this->_getCount($request, $builder);
if (empty($page)) {
$this->_of = $request->input('of');
$this->_table = $order->getTable();
$this->_total = $total;
$this->_pagesize = $pagesize > $total ? $total : $pagesize;
return $this->view('agent-backend.order.export');
}
$data = $this->_getExport($request, $builder);
return $this->success('', FALSE, $data);
}