eloquent-driver icon indicating copy to clipboard operation
eloquent-driver copied to clipboard

Use the database driver conditionally for specific collections

Open nfragkos opened this issue 4 years ago • 5 comments

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.

nfragkos avatar Jan 09 '21 14:01 nfragkos

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.

edalzell avatar Jan 09 '21 16:01 edalzell

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.

nfragkos avatar Jan 30 '21 14:01 nfragkos

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

ryanmitchell avatar Feb 15 '22 14:02 ryanmitchell

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.

edalzell avatar Feb 15 '22 16:02 edalzell

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 :)

ryanmitchell avatar Feb 15 '22 17:02 ryanmitchell