8000 morphMany Relationships Eloquent to JSON API · Issue #505 · cloudcreativity/laravel-json-api · GitHub
[go: up one dir, main page]

Skip to content
morphMany Relationships Eloquent to JSON API #505
Closed
@linckosz

Description

@linckosz

In the documentation ( https://laravel-json-api.readthedocs.io/en/latest/basics/adapters/ ), in the chapter "Relationships", the mapping from Eloquent to JSON API seems wrong.
Current:
morphMany => hasMany
Proposal:
morphMany => morphMany

Also, the chapter "Morph-Many" says "morphMany => morphMany".
But the chapter "Has-Many" is saying "morphMany => hasMany".

In my project, I am using the mapping "morphMany => morphMany" (in getRelated method) and it works fine this way.

Regards,

Bruno

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0