Laravel SQLite and Json

Viewed 761

I red here that Laravel 5.3+ support JSON columns for where and update syntax, like that :

$redLovers = DB::table('users')
->where('meta->favorite_color', 'red')
->get();

But the documentation says it works with MySQL 5.7+, but there is no mentions about SQLite. I know that, by default, SQLite doesn't support JSON column type but there is a JSON1 extension that provide this support.

Before installing the JSON1 extension, I would like to know if somebody can confirm me that it will work with Laravel 5.3+ features to make query on JSON columns.

Thanks

Alex

1 Answers

This is an old question but I can confirm that the Laravel json column support does work with sqlite.

I'm currently dealing with trying to update a server to use a newer version of sqlite and the json1 extension to support it after I confirmed with sqlite on my local dev environment and came across this question.

Related