Answers for "how defind text in laravel migration"

PHP
0

long text in laravel migration

Schema::create('posts', function ($table) {
    $table->increments('id');
    $table->integer('user_id');
    // ...
    $table->longText('description');
    // ...
}
Posted by: Guest on September-04-2021
-1

how to change the colum type in migration laravel

public function changeColumnType($table, $column, $newColumnType) {                
    DB::statement("ALTER TABLE $table CHANGE $column $column $newColumnType");
}
Posted by: Guest on January-12-2022

Code answers related to "how defind text in laravel migration"

Browse Popular Code Answers by Language