Answers for "laravel migration text length"

PHP
6

laravel migration remove column

public function up()
{
  Schema::table('table', function($table) {
    $table->dropColumn('column_name');
  });
}
Posted by: Guest on April-16-2020
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

laravel migration change column length

Schema::table('users', function ($table) {
    $table->string('name', 50)->change();
});
Posted by: Guest on November-19-2020

Code answers related to "laravel migration text length"

Browse Popular Code Answers by Language