Skip to content

Commit

Permalink
Make things work with latest Laravel / PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
emilsundberg committed Oct 20, 2024
1 parent 3f67833 commit ec80269
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ Beautymail makes it super easy to send beautiful responsive HTML emails. It's ma
* Invoices
* Data exports

If you're on Laravel 4, use the `1.x` branch.

### Index:

- [Templates](#templates)
Expand All @@ -19,7 +17,7 @@ If you're on Laravel 4, use the `1.x` branch.

## Templates

There are tons of great looking HTML email templates out there. Campaign Monitor and Mailchimp has released hundreds for free. It is pretty simple to adapt a template to Beautymail. If you do, please send a PR.
There are tons of great looking HTML email templates out there. Campaign Monitor and Mailchimp has released hundreds for free. It is pretty simple to adapt a template to Beautymail.

__Widgets__ by [Campaign Monitor](https://www.campaignmonitor.com/templates/all/):

Expand All @@ -37,11 +35,9 @@ __Sunny__

Add the package to your `composer.json` by running:

composer require snowfire/beautymail

When it's installed, publish assets to your public folder

php artisan vendor:publish --provider="Snowfire\Beautymail\BeautymailServiceProvider"
```bash
composer require snowfire/beautymail
```

Configure your settings such as logo url and social links in `config/beautymail.php`

Expand Down Expand Up @@ -250,4 +246,4 @@ In order to get Beautymail working on Lumen you need to add the following to you

### Start using Beautymail

Congratulations, you can know start using bBautmail in Lumen. See: [Send your first Beauty mail](#send-your-first-beauty-mail) on what to do next.
Congratulations, you can know start using Beautymail in Lumen. See: [Send your first Beauty mail](#send-your-first-beauty-mail) on what to do next.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"require": {
"php": ">=5.4.0",
"php": ">=7.0.0",
"illuminate/support": "4.*|5.*|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
"pelago/emogrifier": "^3.0|^4.0|^5.0|^6.0|^7.0"
},
Expand Down
7 changes: 6 additions & 1 deletion src/Snowfire/Beautymail/Beautymail.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ private function setLogoPath()
$this->settings['logo']['path'] = str_replace(
'%PUBLIC%',
\Request::getSchemeAndHttpHost(),
$this->settings['logo']['path']
$this->settings['logo']['path'] ?? ''
);
}

public function sendNow($mailable, array $data = [], $callback = null)
{
return $this->mailer->sendNow($mailable, $data, $callback);
}
}
2 changes: 1 addition & 1 deletion src/Snowfire/Beautymail/BeautymailServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function register()
function ($app) {
return new \Snowfire\Beautymail\Beautymail(
array_merge(
config('beautymail.view'),
config('beautymail.view', []),
[
'css' => !is_null(config('beautymail.css')) && count(config('beautymail.css')) > 0 ? implode(' ', config('beautymail.css')) : '',
]
Expand Down

0 comments on commit ec80269

Please sign in to comment.