_chris's avatar

Using flat file database structure

Hi all,

I'm working on a project which uses Filebase as the database. I'd like to still be able to use eloquent to retrieve data from the database but I'm not sure how to go about this.

Let's say I have a Project model. I'd like to be able to do things like: Project::all(), obviously at the moment when I try that I get a database query exception telling me that 'projects' is not a database. Do I need to make a database driver for Filebase? Or do I need some sort of service provider to link the two?

Thanks!

0 likes
2 replies
xqus's avatar

Laravel's database component uses PDO internally, which means it can only work with the databases that PDO supports.

You could write your own driver, but I would guess it's easier to switch to another database. See this mongodb implementation for an example: https://github.com/jenssegers/laravel-mongodb

jlrdw's avatar

Have you considered migrating data to MySql.

Please or to participate in this conversation.