Skip to content

Commit 25eabcf

Browse files
authored
[0.2] Add MAIL_EXPORT env variable (#8)
1 parent c892135 commit 25eabcf

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

.github/workflows/run-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push, pull_request]
44

55
jobs:
66
test:
7-
runs-on: ubuntu-16.04
7+
runs-on: ubuntu-18.04
88
strategy:
99
fail-fast: true
1010
matrix:

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ php artisan vendor:publish --provider="PodPoint\MailExport\MailExportServiceProv
3535

3636
You will be able to specify:
3737

38-
* `enabled`: wether this package is enabled or not.
38+
* `enabled`: wether this package is enabled or not. Once installed, it's enabled by default but the `MAIL_EXPORT` environment variable can be used to configure this.
3939
* `disk`: which disk to use by default. `null` will use the default disk from your application filesystem.
4040
* `path`: the default path you would like to export your mails within a storage disk.
4141

@@ -57,7 +57,7 @@ use PodPoint\MailExport\Contracts\ShouldExport;
5757
class OrderShipped extends Mailable implements ShouldExport
5858
{
5959
use Exportable;
60-
60+
6161
// ...
6262
}
6363
```
@@ -84,13 +84,13 @@ use PodPoint\MailExport\Contracts\ShouldExport;
8484
class OrderShipped extends Mailable implements ShouldExport
8585
{
8686
use Exportable;
87-
87+
8888
public $exportDisk = 'some_disk';
8989

9090
public $exportPath = 'some_path';
9191

9292
public $exportFilename = 'some_filename';
93-
93+
9494
// ...
9595
}
9696
```
@@ -109,9 +109,9 @@ use PodPoint\MailExport\Contracts\ShouldExport;
109109
class OrderShipped extends Mailable implements ShouldExport
110110
{
111111
use Exportable;
112-
112+
113113
// ...
114-
114+
115115
public function exportDisk(): string
116116
{
117117
return 'some_disk';
@@ -148,11 +148,11 @@ use Illuminate\Notifications\Notification;
148148
class OrderShipped extends Notification
149149
{
150150
// ...
151-
151+
152152
public function toMail($notifiable)
153153
{
154154
return (new Mailable($this->order))->to($notifiable->email);
155-
}
155+
}
156156
}
157157
```
158158

@@ -175,7 +175,7 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
175175
## Credits
176176

177177
- [themsaid](https://github.com/themsaid) and Spatie's [laravel-mail-preview](https://github.com/spatie/laravel-mail-preview) for some inspiration
178-
- [Laravel Package Development](https://laravelpackage.com) documentation by [John Braun](https://github.com/Jhnbrn90)
178+
- [Laravel Package Development](https://laravelpackage.com) documentation by [John Braun](https://github.com/Jhnbrn90)
179179
- [Pod Point](https://github.com/pod-point)
180180
- [All Contributors](https://github.com/pod-point/laravel-mail-export/graphs/contributors)
181181

config/mail-export.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
|
1414
*/
1515

16-
'enabled' => true,
16+
'enabled' => env('MAIL_EXPORT', true),
1717

1818
/*
1919
|--------------------------------------------------------------------------

0 commit comments

Comments
 (0)