Added email config for dev/testing
Change-Id: If7e26d0d12b7cd90ccdc4b4f113b0de80f6d5e23
This commit is contained in:
@@ -40,6 +40,7 @@ use App\Factories\EntityEvents\TrackActionEntityEventFactory;
|
|||||||
use App\Factories\EntityEvents\TrackGroupActionActionEntityEventFactory;
|
use App\Factories\EntityEvents\TrackGroupActionActionEntityEventFactory;
|
||||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
use Illuminate\Support\Facades\Event;
|
use Illuminate\Support\Facades\Event;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
/**
|
/**
|
||||||
* Class EventServiceProvider
|
* Class EventServiceProvider
|
||||||
* @package App\Providers
|
* @package App\Providers
|
||||||
@@ -70,6 +71,12 @@ final class EventServiceProvider extends ServiceProvider
|
|||||||
EntityEventPersister::persist(MyScheduleAddEntityEventFactory::build($event));
|
EntityEventPersister::persist(MyScheduleAddEntityEventFactory::build($event));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Event::listen(\Illuminate\Mail\Events\MessageSending::class, function($event){
|
||||||
|
if(App::environment() === 'dev' || App::environment() === 'testing' ){
|
||||||
|
$event->message->setTo(env('DEV_EMAIL_TO'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Event::listen(\App\Events\MyFavoritesAdd::class, function($event)
|
Event::listen(\App\Events\MyFavoritesAdd::class, function($event)
|
||||||
{
|
{
|
||||||
EntityEventPersister::persist(MyFavoritesAddEntityEventFactory::build($event));
|
EntityEventPersister::persist(MyFavoritesAddEntityEventFactory::build($event));
|
||||||
|
|||||||
Reference in New Issue
Block a user