set size of integer fields value limit in migration file of Laravel (7,8,9).
I am trying this code. but it's not work
$table->id();
$table->string('name');
$table->integer('ISBN_no',15);
CodePudding user response:
This Code worked perfectly. i found this code on Stackoverflow
$table->id();
$table->string('name');
$table->integer('ISBN_no')->length(100);
CodePudding user response:
You can't do this, but you can use different types of integer as shown bellow:
$table->tinyInteger()
$table->smallInteger()
$table->integer()
$table->mediumInteger()
$table->bigInteger()