if the code like this : $table->integer('no', 3);, it's failed
if the code like this : $table->integer('no');, it's success
why when I use lenth, it failed to migrate db?
That's because integer() second parameter is $autoIncrement which accepts true or false. You can't pass 3:
public function integer($column, $autoIncrement = false, $unsigned = false)
tinyInteger and smallInteger types.You cannot specify the length of an integer column, if that is what you are trying to accomplish. See this answer here for a full explanation https://stackoverflow.com/a/25772960/7202919