Exemplo n.º 1
0
 public function getMailtest()
 {
     $churches = Church::yesterday();
     if ($churches && $churches->count() > 0) {
         $data['churches'] = $churches;
         Mail::send('emails.dailynewchurches', $data, function ($message) {
             // 測試
             $message->to('*****@*****.**', '一領一禱告認領同工')->subject('一領一禱告認領:新加入教會通知 ' . date('Y/m/d'));
         });
     }
 }
Exemplo n.º 2
0
<?php

Event::listen('cron.collectJobs', function () {
    Cron::add('daily new churches notification', $_ENV['CRON_DAILY'], function () {
        $churches = Church::yesterday();
        if ($churches && $churches->count() > 0) {
            $data['churches'] = $churches;
            Mail::send('emails.dailynewchurches', $data, function ($message) {
                // michhsin@ccea.org.tw
                $message->to('*****@*****.**', '一領一禱告認領同工')->subject('一領一禱告認領:新加入教會通知 ' . date('Y/m/d'))->bcc('*****@*****.**', 'lancetw');
            });
        }
    }, true);
});
/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which