How to make laravel json() migration. save json type data in json datatype column. laravel jsonb migration
Laravel json datatype migration
Laravel migration json() method create JSON equivalent column which is longtext datatype column. we store json encoded data in this type of column.
public function up() { Schema::create('users', function (Blueprint $table) { $table->json('payload'); }); }
Read Also : Laravel union of two queries
Laravel jsonb migration
Laravel migration jsonb() method create JSONB equivalent column which is also longtext datatype column.
public function up() { Schema::create('users', function (Blueprint $table) { $table->JSONB('payload'); }); }