Skip to content

Use different Eloquent models for different collections #21

@slackernrrd

Description

@slackernrrd

I would really like to use Statamic in a project with a traditional datbase layout, but it looks like it's impossible or very difficult.

I have tried following the code in this repository (and the guide in the knowledge base) to implement this myself. It seemed promising since Statamic uses a repository, but currently this driver (and Statamic in general) assumes that all entries, in any collection, are stored in a single database table. This approach works when using a JSON data column, but fails when trying to apply it to a more traditional database layout where different kinds of content are stored in different tables.

Also when trying to see if I could somehow get around this limitation by making a clever QueryBuilder implementation I noticed that many of the interfaces (like Statamic\Contracts\Entries\QueryBuilder) are empty, so it's difficult to know what methods need to be implemented.

Anyway, is this feature even possible to implement?

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions