如何在 Laravel 6 中迁移期间将数据类型用作 "blob"

how to use data type as "blob" during migration in Laravel 6

当我尝试迁移时出现错误

,我想将 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 : Method Illuminate\Database\Schema\Blueprint::blob does not exist.

at xampp\htdocs\minidmsapi\vendor\laravel\framework\src\Illuminate\Support\Traits\Macroable.php:104

Laravel 中他们有 binary 而不是 blobbinary 等价于 blob.

您可以像这样使用它:

$table->binary('name'); 

有关详细信息,请参阅 docs

谢谢