/** * send Business Report. * * @param Business $business * * @return void */ protected function sendBusinessReport(Business $business) { $this->info(__METHOD__); $this->info("Sending to businessId:{$business->id}"); $appointments = $this->concierge->setBusiness($business)->getActiveAppointments(); $owner = $business->owners()->first(); // Mail to User $header = ['email' => $owner->email, 'name' => $owner->name]; $this->transmail->locale($business->locale)->template('appointments.manager._schedule')->subject('manager.business.report.subject', ['date' => date('Y-m-d'), 'business' => $business->name])->send($header, compact('business', 'appointments')); }
/** * @test * @expectedException \Exception */ public function it_throws_exception_on_unexisting_view() { $this->transmail->locale('en_US.utf8')->template('!!!UNEXISTING!!!')->subject('welcome')->send($this->header, $this->params); }