Skip to content

Commit dd46bed

Browse files
committed
Add support for publishing the config file
1 parent 7a156cb commit dd46bed

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,38 @@ You can install the package via composer:
2626
composer require robkerry/emailit-laravel-driver
2727
```
2828

29-
After that, you need to set `EMAILIT_API_KEY` in your `.env` file:
30-
31-
```dotenv
32-
EMAILIT_API_KEY=
29+
If you'd like to publish the config file, you can do that using:
30+
```bash
31+
php artisan vendor:publish --tag=emailit-config
3332
```
3433

35-
Add Emailit as a Laravel Mailer in `config/mail.php` in `mailers` array:
34+
Next, you need to set `EMAILIT_API_KEY` in your `.env` file:
3635

37-
```php
38-
'emailit' => [
39-
'transport' => 'emailit',
40-
],
36+
```dotenv
37+
EMAILIT_API_KEY=
4138
```
4239

43-
And set environment variable `MAIL_MAILER` in your `.env` file
40+
And set the environment variable `MAIL_MAILER` in your `.env` file
4441

4542
```dotenv
4643
MAIL_MAILER=emailit
4744
```
4845

49-
Also, double check that your `FROM` data is filled in `.env`:
46+
Then, double check that your `FROM` data is filled in `.env`:
5047

5148
```dotenv
5249
MAIL_FROM_ADDRESS=app@yourdomain.com
5350
MAIL_FROM_NAME="App Name"
5451
```
5552

53+
Lastly, add Emailit as a Laravel Mailer in `config/mail.php` in the `mailers` array:
54+
55+
```php
56+
'emailit' => [
57+
'transport' => 'emailit',
58+
],
59+
```
60+
5661
<a name="thanks"></a>
5762
# Thanks
5863

src/LaravelDriverServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function boot()
2626
if ($this->app->runningInConsole()) {
2727
$this->publishes([
2828
__DIR__.'/../config/emailit.php' => config_path('emailit.php'),
29-
], 'config');
29+
], 'emailit-config');
3030
}
3131
}
3232

0 commit comments

Comments
 (0)