예제 #1
0
 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();
 }
예제 #2
0
파일: content.php 프로젝트: Nazg-Gul/gate
 function content_path($id)
 {
     if ($id <= 1) {
         return '';
     }
     $r = db_row_value('content', "`id`={$id}");
     return content_path($r['pid']) . '/' . $r['path'];
 }