Purpose and implemetnation of json field type in laravel schema builder -
what purpose of $table->json('options');
field type of laravel database schema builder.i tried searching hard couldn't relevant info on it.please 1 state list purpose example
some database engines - postgresql being major example - have json-friendly data types (that mysql lacks - it'll store text
data type there). can handy working data (like options
example cite) might contain large amount of schema-less or loosely-structured data.
- http://www.postgresql.org/docs/9.4/static/datatype-json.html
- http://www.postgresql.org/docs/9.3/static/functions-json.html
instead of having 100+ columns bunch of on/off options model, store them in json object in database.
Comments
Post a Comment