コード例 #1
0
 public function export(Request $request, Account $account)
 {
     $news = new WechatDepotNews();
     $builder = $news->newQuery();
     $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 = $news->getTable();
         $this->_total = $total;
         $this->_pagesize = $pagesize > $total ? $total : $pagesize;
         return $this->view('wechat::admin.wechat.news.export');
     }
     $data = $this->_getExport($request, $builder)->where('waid', $account->getAccountID());
     return $this->success('', FALSE, $data);
 }