tlan16

Bedshed

Nov 9th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.88 KB | None | 0 0
  1. $faker = Factory::create();
  2.         $data = new Collection();
  3.         $campaignNames = [
  4.             "30% Off Storewide Sale",
  5.             "45% Off Big Grand Sale",
  6.             "WIN!! Instagram competition on Now!",
  7.             "Mother’s Day Sale",
  8.             "Bedroom Planner - Plan your perfect bedroom!",
  9.             "Night Comfort Guarantee - Sleep Easy or Exchange",
  10.         ];
  11.         foreach ($campaignNames as $campaignName) {
  12.             $data->add([
  13.                 'campaign_name' => $campaignName,
  14.                 'description' => $faker->sentences(3, true),
  15.                 'start_date' => $faker->dateTimeBetween('-30 days', 'now')->format('d/m/y'),
  16.                 'end_data' => $faker->dateTimeBetween('now', '+30 days')->format('d/m/y'),
  17.                 'actions' => $faker->imageUrl(),
  18.             ]);
  19.         }
  20.  
  21.         $this->info(AppHelper::toDataTable($data));
Advertisement
Add Comment
Please, Sign In to add comment