Ad
How To Use Data Type As "blob" During Migration In Laravel 6
I want to store HTML in the database as blob data type when I try to migrate getting errors
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
Ad
Answer
In Laravel
they have binary
instead of blob
. binary
is equivalent to blob
.
You can use it like:
$table->binary('name');
For more information see docs.
Thanks
Ad
source: stackoverflow.com
Related Questions
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS - Conditionally Load a Different Page
- → Make a Laravel collection into angular array (octobercms)
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?
- → Validating fileupload(image Dimensions) in Backend Octobercms
- → OctoberCMS Fileupload completely destroys my backend
- → How do I call the value from another backed page form and use it on a component in OctoberCms
Ad