-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added fallback methods for from mails
- Loading branch information
1 parent
a089645
commit d771816
Showing
4 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Codedor\FilamentMailTemplates\Facades; | ||
|
||
class MailTemplateFallbacks extends \Illuminate\Support\Facades\Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Codedor\FilamentMailTemplates\MailTemplateFallbacks::class; | ||
} | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace Codedor\FilamentMailTemplates; | ||
|
||
class MailTemplateFallbacks | ||
{ | ||
public null|string $fromName = null; | ||
public null|string $fromMail = null; | ||
|
||
public function __construct() | ||
{ | ||
$this->fromName = config('mail.from.name'); | ||
$this->fromMail = config('mail.from.address'); | ||
} | ||
|
||
public function fromName(null|string $fromName): self | ||
{ | ||
$this->fromName = $fromName; | ||
|
||
return $this; | ||
} | ||
|
||
public function getFromName(): null|string | ||
{ | ||
return $this->fromName; | ||
} | ||
|
||
public function fromMail(null|string $fromMail): self | ||
{ | ||
$this->fromMail = $fromMail; | ||
|
||
return $this; | ||
} | ||
|
||
public function getFromMail(): null|string | ||
{ | ||
return $this->fromMail; | ||
} | ||
} |