Пример #1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     logger()->info('Generating Root Report');
     $registeredUsersCount = DB::table('users')->count();
     logger()->info('Users Count: ' . $registeredUsersCount);
     // Mail to Root
     $params = ['registeredUsersCount' => $registeredUsersCount];
     $header = ['name' => 'Root', 'email' => config('root.report.to_mail')];
     $this->transmail->template('root.report')->subject('root.report')->send($header, $params);
 }
Пример #2
0
 /**
  * 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'));
 }
Пример #3
0
 /**
  * @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);
 }