reports->window(); return view('admin.reports.daily', [ 'portal' => $this->portal(), 'defaultFrom' => $from->toDateString(), 'defaultTo' => $to->toDateString(), ]); } public function data(Request $request) { $filters = [ 'date_from' => trim((string) $request->query('date_from', '')), 'date_to' => trim((string) $request->query('date_to', '')), 'date_range' => trim((string) $request->query('date_range', '')), 'agent_user_id' => $this->isAgentPortal() ? null : AgentScope::parseAgentUserIdFilter($request->query('agent_user_id')), ]; [$from, $to] = $this->reports->resolveBounds($filters); return response()->json([ 'code' => 0, 'msg' => '', 'data' => [ 'rows' => $this->reports->rows($this->agent(), $filters), 'from' => $from->toDateString(), 'to' => $to->toDateString(), ], ]); } }