当我尝试迁移时遇到错误时,我想将HTML作为blob数据类型存储在数据库中
Schema::create('projects', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('project_name');
$table->blob('project_description');
$table->timestamps();
});
}
php artisan module:migrate projects
Migrating: 2019_10_17_125423_create_projects_table
BadMethodCallException:方法 Illuminate \ Database \ Schema \ Blueprint :: blob不存在。
在xampp \ htdocs \ minidmsapi \ vendor \ laravel \ framework \ src \ Illuminate \ Support \ Traits \ Macroable.php:104
答案 0 :(得分:0)
答案 1 :(得分:0)
没有这样的方法blob()
。是binary()
:
$table->binary('data'); // BLOB equivalent for the database