moduleDomainRepository->filter( [ 'customer_id' => auth('users')->id(), 'status' => 0 ] ); $invocie_unpaid = $this->invoiceRepository->filter( [ 'customer_id' => auth('users')->id(), 'status' => 0 ] ); $ticket = $this->ticketRepository->filter( [ 'customer' => auth('users')->id() ] )->unique('ticket_num'); $discount = $this->discountRepository->filter( [ 'status' => 'active', 'end' => [ 'key' => 'end', 'condition' => '>', 'value' => Carbon::now()->timestamp ] ] ); $posts = $this->postRepository->filter([ 'published' => 1, 'limit' => 4 ]); $vmware = $this->vmwareRepository->filter([ 'customer_id' => auth('users')->id(), 'status' => 1 ]); $hosting = $this->moduleHostingRepository->filter([ 'customer_id' => auth('users')->id(), 'status' => 1 ]); $title = "Khu vực khách hàng"; return view('frontend.home', compact( 'domain', 'discount', 'invocie_unpaid', 'ticket', 'title', 'posts', 'vmware', 'hosting' )); } public function index_new() { $title = "Khu vực khách hàng"; $domain = $this->moduleDomainRepository->filter( [ 'customer_id' => auth('users')->id(), 'status' => 0 ] ); $invocie_unpaid = $this->invoiceRepository->filter( [ 'customer_id' => auth('users')->id(), 'status' => 0 ] ); $ticket = $this->ticketRepository->filter( [ 'customer' => auth('users')->id() ] )->unique('ticket_num'); $discount = $this->discountRepository->filter( [ 'status' => 'active', 'end' => [ 'key' => 'end', 'condition' => '>', 'value' => Carbon::now()->timestamp ] ] ); $posts = $this->postRepository->filter([ 'published' => 1, 'limit' => 4 ]); $vmware = $this->vmwareRepository->filter([ 'customer_id' => auth('users')->id(), 'status' => 1 ]); $hosting = $this->moduleHostingRepository->filter([ 'customer_id' => auth('users')->id(), 'status' => 1 ]); return view( "frontend.home.index", [ 'title' => $title, 'breadcrumbs' => $this->crums->add(__('Dashboard'))->add(__('Khu vực khách hàng')), 'domain' => $domain, 'discount' => $discount, 'invocie_unpaid' => $invocie_unpaid, 'ticket' => $ticket, 'posts' => $posts, 'vmware' => $vmware, 'hosting' => $hosting ] ); } }