Exemplo n.º 1
0
 public static function generateWorld()
 {
     City::truncate();
     $cities = [];
     // Generate cities
     for ($i = 0; $i < self::NUM_OF_CITIES; $i++) {
         $city = City::generate();
         $cities[] = $city;
         echo "<br />City {$i}:<br />";
         var_dump($city->getAttributes());
         $city->save();
     }
 }