示例#1
0
文件: factory.php 项目: ajb/rfpez
 public static function section()
 {
     $faker = Faker\Factory::create();
     $s = new ProjectSection(array('section_category' => 'Requirements', 'title' => implode(" ", $faker->words), 'body' => $faker->paragraph, 'public' => rand(0, 8) == 0 ? false : true, 'times_used' => rand(0, 20)));
     $s->save();
     $s->project_types()->sync(ProjectType::lists('id'));
 }