Answers for "nullable migration laravel"

PHP
3

laravel migration make column nullable

Schema::table('users', function($table)
{
    $table->string('name', 50)->nullable()->change();
});

This is the correct syntax to revert the migration:

$table->integer('user_id')->unsigned()->nullable(false)->change();
Posted by: Guest on January-21-2021
6

laravel migration remove column

public function up()
{
  Schema::table('table', function($table) {
    $table->dropColumn('column_name');
  });
}
Posted by: Guest on April-16-2020
1

laravel change column

Schema::table('users', function (Blueprint $table) {
    $table->string('name', 50)->nullable()->change();
});
Posted by: Guest on April-02-2020
1

create migration laravel

php artisan make:Model Product -m -c  --resource
Posted by: Guest on November-26-2020
0

laravel migration table column nullable

$table->string(/*column name*/, /*size*/)->nullable(true);
Posted by: Guest on October-19-2021

Code answers related to "nullable migration laravel"

Browse Popular Code Answers by Language