laravel数据填充

post表有这2个字段

 

填充20条数据,

执行 php artisan tinker

执行预览

 factory(App\Post::class,20)->make();

插入数据库

 factory(App\Post::class,20)->create();

  

 

posted @ 2017-10-20 21:25  spectrelb  阅读(181)  评论(0编辑  收藏  举报