I am new to laravel.
Now i am using the migrate command to make a table, but the length of the filed is not applicable. Laravel does not provide this option. ?
Below is my codes:
$table->increments('id')->length(11);
$table->dateTime('created_time');
$table->integer('bank_id')->length(11);
$table->tinyInteger('is_black')->length(1);
The length of the field is_black
should be 1, but it is actually being generated as 4.
How can I solve this problem ?
Any suggestion or advice would be appreciated.
Thank you in advance
You can't do this, but you can use different types of integer:
$table->bigInteger()
$table->mediumInteger()
$table->integer()
$table->smallInteger()
$table->tinyInteger()