Skip to content

Commit

Permalink
[8.x] Collection Importer (#653)
Browse files Browse the repository at this point in the history
Co-authored-by: duncanmcclean <[email protected]>
  • Loading branch information
duncanmcclean and duncanmcclean authored Feb 7, 2025
1 parent 5a35a1b commit 8336ab7
Show file tree
Hide file tree
Showing 10 changed files with 497 additions and 778 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"pixelfear/composer-dist-plugin": "^0.1.5",
"spatie/ignition": "^1.15",
"spatie/invade": "^2.1",
"statamic/cms": "^5.41"
"statamic/cms": "^5.41",
"stillat/proteus": "^4.0"
},
"require-dev": {
"laravel/pint": "^1.0",
Expand Down
8 changes: 6 additions & 2 deletions docs/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ title: Resources

For each of the Eloquent models you wish to use with Runway, you’ll need to define a ‘resource’.

A resource basically tells Runway about the model and how you’d like it to be configured - which blueprint to use, whether or not it should be manageable in the CP, etc.
A resource basically tells Runway about the model and how you’d like it to be configured - which blueprint to use, whether it should be manageable in the CP, etc.

## Defining resources

You can define resources inside of the configuration file published during installation. It’s located in `config/runway.php`.
You can define resources inside the configuration file published during installation. It’s located in `config/runway.php`.

```php
<?php
Expand Down Expand Up @@ -58,6 +58,10 @@ class Order extends Model

Finally, you can start adding fields to your resource's blueprint. To learn more about using Blueprints in Runway, please review the [Blueprints](/blueprints) page.

:::tip Hot Tip
If you're moving a collection to the database, use the `php please runway:import-collection` command. It'll help you set up everything you need, including moving your entries to the database.
:::

## Configuring resources

There’s about a dozen configuration options available for resources, they are all documented below.
Expand Down
6 changes: 6 additions & 0 deletions docs/upgrade-guides/v7-to-v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ To work around this, v8 introduces some changes around how nested fields are con

As an upside of this new approach, nested fields can now be used with Runway's [GraphQL API](/graphql).

## Low impact changes

### Removal of the `cp_icon` config option

The `cp_icon` configuration option has been removed in Runway 8, in favour of being able to change the icon using Statamic's [Nav Preferences](https://statamic.dev/preferences#accessing-preferences) feature.
Expand All @@ -79,6 +81,10 @@ The `cp_icon` configuration option has been removed in Runway 8, in favour of be
],
```

### Generate Migrations command has been removed

The `runway:generate-migrations` command has been removed in favour of the new `runway:import-collection` command which handles the entire process of generating Eloquent models, database migrations and importing entries.

## Previous upgrade guides

- [v3.x to v4.0](/upgrade-guides/v3-x-to-v4-0)
Expand Down
Loading

0 comments on commit 8336ab7

Please sign in to comment.