@@ -6,29 +6,35 @@ Currently only supports entries, with more to come.
66
77## Installation
88
9+ Install using Composer:
910```
1011composer require statamic/eloquent-driver
1112```
1213
14+ Publish the config file:
15+
16+ ```
17+ php artisan vendor:publish --provider="Statamic\Eloquent\ServiceProvider"
18+ ```
1319
1420Since 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
1925If 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
2834If 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