Laravel 5.5 set size of integer fields in migration file
You can't do this, but you can use different types of integer:
$table->bigInteger()$table->mediumInteger()$table->integer()$table->smallInteger()$table->tinyInteger()
According to https://laravel.com/docs/5.5/migrations,you can use one of these types:
$table->bigInteger('votes');$table->integer('votes');$table->mediumInteger('votes'); $table->smallInteger('votes');$table->tinyInteger('votes');$table->unsignedBigInteger('votes');$table->unsignedMediumInteger('votes'); $table->unsignedSmallInteger('votes'); $table->unsignedTinyInteger('votes');
According to https://laravel.com/docs/5.1/migrations, as of Laravel 5.1 you can use the boolean
column type to create a "boolean-like" TINYINT
of length 1 (MySQL). So, for example:
$table->boolean('nameOfColumn');