所以我使用artisan
新db:seed
为我的数据库添加了一些ID,但现在我需要将所有ID增加1.我知道如何找到一个数字,但我不能弄清楚如何在替换盒中增加它(如果可能的话)。
<?php
return array(
array("title"=>'Paris',
"country_id"=>0),
array("title"=>'Lion',
"country_id"=>0),
array("title"=>'Nice',
"country_id"=>0),
array("title"=>'Nantes',
"country_id"=>0),
array("title"=>'Bordeaux',
"country_id"=>0),
array("title"=>'Montpellier',
"country_id"=>0),
array("title"=>'Berlin',
"country_id"=>1),
array("title"=>'Halle',
"country_id"=>1),
array("title"=>'Leipzig',
"country_id"=>1),
array("title"=>'Dredsen',
"country_id"=>1),
array("title"=>'Hamburg',
"country_id"=>1),
array("title"=>'Altona',
"country_id"=>1),
array("title"=>'Rome',
"country_id"=>2),
array("title"=>'Verona',
"country_id"=>2),
array("title"=>'Venice',
"country_id"=>2),
array("title"=>'Milan',
"country_id"=>2),
array("title"=>'Naples',
"country_id"=>2),
array("title"=>'Turin',
"country_id"=>2),
array("title"=>'Luzern',
"country_id"=>3),
array("title"=>'Zurich',
"country_id"=>3),
array("title"=>'Berne',
"country_id"=>3),
array("title"=>'Geneva',
"country_id"=>3),
array("title"=>'Basel',
"country_id"=>3),
array("title"=>'Lugano',
"country_id"=>3)
);