Skip to content

Commit 0c3d856

Browse files
committed
📝 updating readme
1 parent ac50d6a commit 0c3d856

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,39 @@
77

88
This is a work in progress, which once complete will allow you to export the Tapestry project state to a database for manipulation by third party tools. In the case of Tapestry this is a precursor to the API plugin for an in browser admin panel.
99

10+
### Install
11+
12+
To install run `composer require tapestry-cloud/database-plugin`
13+
14+
### Setup
15+
16+
Update your site configuration to include your database configuration:
17+
18+
```php
19+
// ...
20+
'plugins' => [
21+
'database' => [
22+
'driver' => 'pdo_sqlite',
23+
'path' => __DIR__ . DIRECTORY_SEPARATOR . 'db.sqlite'
24+
]
25+
]
26+
// ...
27+
```
28+
29+
Next within your site kernel.php you will need to register the plugins service provider within its boot method:
30+
31+
```php
32+
public function boot(){
33+
// ...
34+
35+
$this->tapestry->register(\TapestryCloud\Database\ServiceProvider::class);
36+
37+
// ...
38+
}
39+
```
40+
41+
Upon you next running tapestry build your database will be updated with the current project state.
42+
1043
### Development
1144

1245
To run migrations use:

0 commit comments

Comments
 (0)