public function makeTheGoodStuff($count, $folder) { $faker = \Faker\Factory::create(); $extension = Config::get('system.default_extension'); $this->output->progressStart($count); for ($x = 1; $x <= $count; $x++) { $content = YAML::dump(['title' => $faker->catchPhrase, 'author' => $faker->name, 'tags' => $faker->words(3)], $faker->realText(500)); File::put(content_path('collections/') . $folder . '/' . $faker->date() . '.' . $faker->slug . '.' . $extension, $content); $this->output->progressAdvance(); } $this->output->progressFinish(); }
function content_path($id) { if ($id <= 1) { return ''; } $r = db_row_value('content', "`id`={$id}"); return content_path($r['pid']) . '/' . $r['path']; }