Closed Boefjim closed 2 months ago
Runway will generate a "handle" for each of your resources, you can see these handles by running php please runway:resources
:
I've opened a PR to fix this (#480) but since it'd be a breaking change for existing sites, it'll be released as part of v7 which'll be released alongside Statamic 5.
In the meantime, you can override the handle of the resource in your Runway config:
UserReview::class => [
'handle' => 'user_review',
],
Description
When creating a blueprint with a
has_many
field, it does not function correctly when theresource
property of the field has a value that references to a handle containing underscores. Instead it only works when the handle is entered with the underscores stripped. So theuser_review.yaml
resources has to be referenced by enteringuserreview
which makes it harder to read, especially for resources with multiple parts (for exampleuser_review_response
would becomeuserreviewresponse
)Steps to reproduce
user_review.yaml
blueprintuser.yaml
blueprint with this field:Environment
Environment Application Name: intranet Laravel Version: 9.52.16 PHP Version: 8.2.10-2ubuntu1 Composer Version: 2.5.8 Environment: local Debug Mode: ENABLED URL: intranet.test Maintenance Mode: OFF
Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: CACHED
Drivers Broadcasting: log Cache: statamic Database: mysql Logs: stack / single Mail: smtp Queue: sync Session: file
Sentry Enabled: MISSING DSN Environment: local Laravel SDK Version: 4.2.0 PHP SDK Version: 4.6.0 Release: NOT SET Sample Rate Errors: 100% Sample Rate Performance Monitoring: 0% Sample Rate Profiling: NOT SET Send Default PII: DISABLED
Statamic Addons: 2 Antlers: regex Sites: 1 Stache Watcher: Enabled Static Caching: Disabled Version: 4.48.0 PRO
Statamic Addons doublethreedigital/runway: 5.6.1 statamic/eloquent-driver: 2.10.0
Statamic Eloquent Driver Asset Containers: file Assets: eloquent Blueprints: file Collection Trees: file Collections: file Entries: eloquent Forms: eloquent Global Sets: eloquent Global Variables: file Navigation Trees: file Navigations: eloquent Revisions: eloquent Taxonomies: file Terms: eloquent