statamic / eloquent-driver

Provides support for storing your Statamic data in a database, rather than flat files.
https://statamic.dev/tips/storing-content-in-a-database
MIT License
104 stars 74 forks source link

Use the database driver conditionally for specific collections #11

Open nfragkos opened 3 years ago

nfragkos commented 3 years ago

Is it possible to have a custom entry class and use it only for a specific collection? I love the idea to have my pages on the filesystem but for a blog collection with thousands of entries to use the database.

edalzell commented 3 years ago

Not possible yet, because all collections share the same repository, but I am trying to figure out how it all works so I can start down that path.

nfragkos commented 3 years ago

I really needed that functionality so I created an addon called Eloquenty. I currently marked it as pre-release as I'm looking for testers and feedback.

ryanmitchell commented 2 years ago

Is this not what runway does? https://statamic.com/addons/double-three-digital/runway

edalzell commented 2 years ago

Is this not what runway does? statamic.com/addons/double-three-digital/runway

No, runway brings Laravel models into antlers and the CP, the other packages uses the db to store Statamic Entries.

ryanmitchell commented 2 years ago

Yeah I guess it was more a question of why :)

If you want entries in the DB use this, if you want them "split" but the same format set up a database view, if you want different models use runway. Each to their own I guess :)