Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 用仿冒剂进行拉维播种_Php_Mysql_Laravel - Fatal编程技术网

Php 用仿冒剂进行拉维播种

Php 用仿冒剂进行拉维播种,php,mysql,laravel,Php,Mysql,Laravel,我正试着和骗子建立一个数据库。但我的数字是0,而不是随机数 播种机: 'title' => $faker->sentence(3), 'content' => $faker->paragraph(5), 'numb' => $faker->randomDigit, 'digi' => $faker->randomDigit,

我正试着和骗子建立一个数据库。但我的数字是0,而不是随机数

播种机:

 'title' => $faker->sentence(3),
                'content' => $faker->paragraph(5),
                'numb' => $faker->randomDigit,
                'digi' => $faker->randomDigit,
                'tags' => join(',', $faker->words(5))
迁移:

$table->integer('numb')->unsigned();
            $table->integer('digi')->unsigned();
所有其他字段都被播种,但numb和digi被播种为“0”

已解决

问题是我忘了在模型中添加可填充的int字段


受保护的$fillable=array()

你在数据库中为他们使用的列类型是什么?@crayon再次阅读这个问题……我使用的是int-aka integerI,我尝试过使用数字的各种种子,但都不起作用。我觉得问题不在于伪造,而在于实际插入。你能多展示一下你的代码吗?