Skip to content

Commit e1e823f

Browse files
committed
Freshen docs
1 parent 69a5a49 commit e1e823f

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Tatter\Outbox
22
Email toolkit for CodeIgniter 4
33

4-
[![](https://github.com/tattersoftware/codeigniter4-outbox/workflows/PHPUnit/badge.svg)](https://github.com/tattersoftware/codeigniter4-outbox/actions/workflows/test.yml)
5-
[![](https://github.com/tattersoftware/codeigniter4-outbox/workflows/PHPStan/badge.svg)](https://github.com/tattersoftware/codeigniter4-outbox/actions/workflows/analyze.yml)
6-
[![](https://github.com/tattersoftware/codeigniter4-outbox/workflows/Deptrac/badge.svg)](https://github.com/tattersoftware/codeigniter4-outbox/actions/workflows/inspect.yml)
4+
[![](https://github.com/tattersoftware/codeigniter4-outbox/workflows/PHPUnit/badge.svg)](https://github.com/tattersoftware/codeigniter4-outbox/actions/workflows/phpunit.yml)
5+
[![](https://github.com/tattersoftware/codeigniter4-outbox/workflows/PHPStan/badge.svg)](https://github.com/tattersoftware/codeigniter4-outbox/actions/workflows/phpstan.yml)
6+
[![](https://github.com/tattersoftware/codeigniter4-outbox/workflows/Deptrac/badge.svg)](https://github.com/tattersoftware/codeigniter4-outbox/actions/workflows/deptrac.yml)
77
[![Coverage Status](https://coveralls.io/repos/github/tattersoftware/codeigniter4-outbox/badge.svg?branch=develop)](https://coveralls.io/github/tattersoftware/codeigniter4-outbox?branch=develop)
88

99
## Quick Start
1010

1111
1. Install with Composer: `> composer require tatter/outbox`
1212
2. Prepare the database: `> php spark migrate -all && php spark db:seed "Tatter\Outbox\Database\Seeds\TemplateSeeder"`
1313
3. Send beautiful, dynamic email:
14-
```
14+
```php
1515
model(TemplateModel::class)->findByName('Default')
1616
->email([
1717
'item' => 'Fancy Purse',
@@ -31,7 +31,7 @@ logging, style inlining, and templating.
3131

3232
Install easily via Composer to take advantage of CodeIgniter 4's autoloading capabilities
3333
and always be up-to-date:
34-
```bash
34+
```shell
3535
composer require tatter/outbox
3636
```
3737

@@ -44,7 +44,7 @@ The library's default behavior can be altered by extending its config file. Copy
4444
**examples/Outbox.php** to **app/Config/** and follow the instructions
4545
in the comments. If no config file is found in **app/Config** then the library will use its own.
4646

47-
If you plan to use the Template Routes (see below) you should also want to configure
47+
If you plan to use the Template Routes (see below) you might also want to configure
4848
[Tatter\Layouts](https://github.com/tattersoftware/codeigniter4-layouts) to ensure the
4949
views are displayed properly for your app.
5050

@@ -73,14 +73,15 @@ supply your own as string parameters, or create a View file and add it to the co
7373
[Responsive HTML Email Template](https://github.com/leemunroe/responsive-html-email-template).
7474
This provides a solid basis for your emails so you can be sure they will display nicely on
7575
any device. Run the Template Seeder to begin using this as the default:
76-
76+
```shell
7777
php spark db:seed "Tatter\Outbox\Database\Seeds\TemplateSeeder"
78+
```
7879

7980
You may also write your own templates and seed them or use the provided MVC bundle for
8081
managing email templates in your database. To enable the Controller you will need to
8182
toggle `$routeTemplates` in the configuration, or add the following routes to **app/Config/Routes.php**:
8283

83-
```
84+
```php
8485
// Routes to Email Templates
8586
$routes->group('emails', ['namespace' => '\Tatter\Outbox\Controllers'], function ($routes)
8687
{
@@ -98,7 +99,7 @@ Be sure to secure appropriate access to these routes (e.g. with a Filter).
9899
Templates use View Parser "tokens" that will be passed through to add your data.
99100
The `Template` Entity can do this for you by passing in your data parameters:
100101

101-
```
102+
```php
102103
$template = model(TemplateModel::class)->findByName('Item Purchase');
103104

104105
$subject = $template->renderSubject(['item' => 'Fancy Purse']);
@@ -110,7 +111,7 @@ template in its parent (if defined).
110111

111112
If you do not need any other configuration you can get a fully prepared
112113
version of the `Email` class with rendered and inlined content from the library:
113-
```
114+
```php
114115
$email = $template->email($data);
115116
$email->setTo('[email protected]')->send();
116117
```

0 commit comments

Comments
 (0)