anand-moghe's avatar

JSON file as a data source

Is it possible to create an eloquent model on top of JSON file ?

0 likes
5 replies
AhimbisibweRoland's avatar

I dont think so. But in my opinion you could wrap decoded json data into a collection. That way you can have an api close to that of the eloquent, like the where, get, sum, average, and so forth.

willvincent's avatar

I dunno about doing it with eloquent, but you can pretty easily build a fake rest server around a json file with the json server nodejs package.

Please or to participate in this conversation.