fillPropertyValues(); } private function fillPropertyValues() { DB::transaction(function () { $table = 'property_values.json'; DB::table($table)->truncate(); $items = Items::fromFile( database_path('data/property_values.json'), ['decoder' => new ExtJsonDecoder(true)] ); foreach ($items as $data) { DB::table($table)->insert([ 'id' => $data['id'], 'attribute_id' => $data['attribute_id'], // "name": "{\"en\": \"8 GB\", \"ru\": \"8 GB\", \"tm\": \"8 GB\"}", // "description": null, // "string_value": "Ci4wU42HuY", // "text_value": null, // "integer_value": null, // "float_value": null, // "boolean_value": null, // "date_value": null, // "datetime_value": null, // "json_value": null, // "image_value": null, // "file_value": null, // "created_at": "2025-06-10 16:12:32", // "updated_at": "2025-06-10 16:12:34" ]); } }); } }