Created
June 20, 2023 12:55
-
-
Save prasanth-j/ea4042e375573f1ce4fe15ff8bf2a494 to your computer and use it in GitHub Desktop.
Redirects emails to configured mail during testing to prevent accidental deliveries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Support\Facades\Mail; | |
public function boot() | |
{ | |
if (!$this->app->environment('production')) { | |
Mail::alwaysTo('admin@example.com'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment