Answer the question
In order to leave comments, you need to log in
The json type field in laravel migration creates a longtext field in the database, why?
Hello!
I create a migration, specify , a field with type longtext is created in the database . How to create json type field in migration? $table->json('options')->nullable();
Answer the question
In order to leave comments, you need to log in
MariaDB does not fully support the JSON type like new versions of MySQL do, but rather emulates it. However, she does it very well, but the field type will be longtext , and JSON will be just an alias to it. It's all in the official documentation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question