what is purpose of $table->json('options');
as field type of laravel database schema builder.I tried searching hard but couldn't get any relevant info on it.Please some one state list purpose with example
Some database engines - PostgreSQL being a major example - have JSON-friendly data types (that MySQL currently lacks - it'll just store as a TEXT
data type there). This can be handy for working with data (like the options
example you cite) that might contain a large amount of schema-less or loosely-structured data.
Instead of having 100+ columns for a bunch of on/off options for a model, you could store them in a JSON object in the database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With