param = $param; } public function build() { try { $params = $this->param; $mailSenderAddress = Config::get('app.mailSenderAddress'); /*echo view('emails.dailyReportMailSales', compact('params')); die();*/ $to = $params['email']; $bcc[] = 'yoy@extranetwork.com'; $bcc[] = 'burhan@extranetwork.com'; $bcc[] = 'cemile@extranetwork.com'; return $this->from($mailSenderAddress, 'Extranetwork') ->view('emails.dailyReportMailSales', compact('params')) ->to($to, 'Extranetwork') ->bcc($bcc) ->subject('Extranetwork Summary Report - '. $params['daily']['period'].' - '. $params['name']); } catch (Exception $e) { $message = $e->getFile() . " " . $e->getLine() . " " . $e->getMessage(); Log::error($message); return output(['status' => -1, 'message' => $e->getMessage()]); } } }