/** * Seed the projects table. * * @return void */ protected function seedProjects() { $defaultProjects = [['name' => 'API', 'description' => 'Used by third-parties to connect to us', 'status' => 1, 'order' => 0, 'team_id' => 0, 'slug' => 'Gitamin'], ['name' => 'Documentation', 'description' => 'Kindly powered by Readme.io', 'status' => 1, 'order' => 0, 'team_id' => 1, 'slug' => 'Baidu'], ['name' => 'Website', 'description' => '', 'status' => 1, 'order' => 0, 'team_id' => 1, 'slug' => 'Alibaba'], ['name' => 'Blog', 'description' => 'The Gitamin Blog.', 'status' => 1, 'order' => 0, 'team_id' => 1, 'slug' => 'Tencent']]; Project::truncate(); foreach ($defaultProjects as $project) { Project::create($project); } }
/** * Seed the projects table. */ protected function seedProjects() { $defaultProjects = [['name' => 'API', 'description' => 'Used by third-parties to connect to us', 'visibility_level' => 0, 'owner_id' => 1, 'creator_id' => 1, 'path' => 'api'], ['name' => 'Documentation', 'description' => 'Kindly powered by Readme.io', 'visibility_level' => 1, 'owner_id' => 2, 'creator_id' => 1, 'path' => 'doc'], ['name' => 'Website', 'description' => 'Tencent Holdings Limited is a Chinese investment holding company', 'visibility_level' => 1, 'owner_id' => 3, 'creator_id' => 1, 'path' => 'website'], ['name' => 'Blog', 'description' => 'The Gitamin Blog.', 'visibility_level' => 1, 'owner_id' => 4, 'creator_id' => 1, 'path' => 'blog']]; Project::truncate(); foreach ($defaultProjects as $project) { Project::create($project); } }
/** * Truncate all tables. */ protected function seedInit() { Owner::truncate(); User::truncate(); Project::truncate(); Member::truncate(); Issue::truncate(); Comment::truncate(); Moment::truncate(); Setting::truncate(); Subscriber::truncate(); }