public function seedSampleTree() { Model::unguard(); $webdev = CategorySimple::create(['name' => 'Web development']); $webdev->children()->create(['name' => 'HTML5']); $webdev->children()->create(['name' => 'CSS3']); $webdev->children()->create(['name' => 'jQuery']); $webdev->children()->create(['name' => 'Bootstrap']); $webdev->children()->create(['name' => 'Laravel']); $october = $webdev->children()->create(['name' => 'OctoberCMS']); $october->children()->create(['name' => 'September']); $october->children()->create(['name' => 'October']); $october->children()->create(['name' => 'November']); $mobdev = CategorySimple::create(['name' => 'Mobile development']); $mobdev->children()->create(['name' => 'iOS']); $mobdev->children()->create(['name' => 'iPhone']); $mobdev->children()->create(['name' => 'iPad']); $mobdev->children()->create(['name' => 'Android']); $design = CategorySimple::create(['name' => 'Graphic design']); $design->children()->create(['name' => 'Photoshop']); $design->children()->create(['name' => 'Illustrator']); $design->children()->create(['name' => 'Fireworks']); Model::reguard(); }