Skip to content

Commit

Permalink
add public properties
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielsolomon committed Dec 4, 2021
1 parent dfba583 commit 1d95ca4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .idea/codestream.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .idea/mail-module.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/symfony2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions src/Models/EmailsTable/EmailTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*
* @property int $id_item
* @property string $type
* @property string $from
* @property string $from_name
* @property string $smtp_host
* @property string $smtp_user
* @property string $smtp_password
Expand All @@ -41,6 +39,11 @@ trait EmailTrait
use MergeTagsRecordTrait;
use TimestampableTrait;

public ?string $from = '';
public ?string $from_name = '';

public ?string $subject = '';

protected static $createTimestamps = 'created';

public function populateFromConfig()
Expand All @@ -65,7 +68,7 @@ public function populateFromItem($item)
*/
public function getFrom()
{
if (empty($this->getAttribute('from'))) {
if (empty($this->getPropertyRaw('from'))) {
$config = app('config');
$this->from = $config->get('mail.from.address');
$this->from_name = $config->get('mail.from.name');
Expand Down

0 comments on commit 1d95ca4

Please sign in to comment.