本文整理匯總了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);
}