Skip to content

Commit 5f30020

Browse files
committed
readme
1 parent 1b9c422 commit 5f30020

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,35 @@ Currently only supports entries, with more to come.
66

77
## Installation
88

9+
Install using Composer:
910
```
1011
composer require statamic/eloquent-driver
1112
```
1213

14+
Publish the config file:
15+
16+
```
17+
php artisan vendor:publish --provider="Statamic\Eloquent\ServiceProvider"
18+
```
1319

1420
Since Statamic uses UUIDs within content files by default, we provide two solutions depending on whether you need to use existing content.
1521

1622

17-
### Fresh install of `statamic/statamic`
23+
### Fresh install of [statamic/statamic](https://github.com/statamic/statamic)
1824

1925
If you're starting from scratch, we can use traditional incrementing integers for IDs.
2026

2127
- Delete `content/collections/pages/home.md`
2228
- Change the structure `tree` in `content/collections/pages.yaml` to `{}`.
23-
- Copy the `create_entries_table` migration.
29+
- Copy the `create_entries_table` migration into `database/migrations`.
2430
- Run `php artisan migrate`.
2531

2632
### Starting from an existing site
2733

2834
If you're planning to use existing content, we can use the existing UUIDs. This will prevent you from needing to update any data or relationships.
2935

30-
- In the config file, change `model` to `UuidEntryModel`.
31-
- Copy the `create_entries_table_with_strings` migration.
36+
- In the `config/statamic-eloquent-driver.php` file, change `model` to `UuidEntryModel`.
37+
- Copy the `create_entries_table_with_strings` migration into `database/migrations`.
3238
- Run `php artisan migrate`.
3339
- Import entries into database with `php please eloquent:import-entries`.
3440

0 commit comments

Comments
 (0)