Пример #1
0
Файл: test.php Проект: emayk/ics
 echo \Emayk\Ics\Repo\Locations\Locations::createRecordCountry();
 sleep(1);
 echo $sep;
 //currency
 echo "Generate Currency ";
 echo \Emayk\Ics\Repo\Currencies\Currencies::generateMassive();
 sleep(1);
 echo $sep;
 //Fabric Grade
 echo "Generate Fabric Grade...";
 echo \Emayk\Ics\Repo\Fabricgrade\Fabricgrade::generateMassive();
 echo $sep;
 sleep(1);
 //					fabric type
 echo "Generate  Fabric Type ...";
 echo \Emayk\Ics\Repo\Fabrictype\Fabrictype::generateMassive();
 sleep(1);
 echo $sep;
 //Bank
 echo "Generate  Bank ...";
 echo \Emayk\Ics\Repo\Bank\Bank::getIdsOrCreateBanks();
 sleep(1);
 echo $sep;
 //					Generate Account
 echo "Generate  Type Account Bank ...";
 echo \Emayk\Ics\Repo\Bankaccounttype\Bankaccounttype::getDefaultBankTypeIdsOrCreate();
 sleep(1);
 echo $sep;
 //					Generate Rekening Bank
 echo "Generate   Account Bank ...";
 echo \Emayk\Ics\Repo\Bankaccount\Bankaccount::createMassiveSampleRecord(false, 100);
Пример #2
0
 /**
  * @param int $count
  *
  * @return array
  */
 public static function getIdsOrCreateDummy($count = 10)
 {
     $ids = static::lists('id');
     if (!count($ids)) {
         $ListfabricTypeIds = Fabrictype::getIdsOrCreateDummy($count);
         $records = static::getFake()->getProductType()->generateMassiveRecords($ListfabricTypeIds, $count);
         foreach ($records as $rec) {
             $prodType = static::create($rec);
             $ids[] = $prodType->id;
         }
     }
     return $ids;
 }