Exemple #1
0
 /**
  * @return array
  */
 public static function getIdsOrCreateSampleUnits()
 {
     $ids = static::lists('id');
     if (!count($ids)) {
         $unitTypeIds = Unittypes::getIdsOrCreate();
         $units = array("meter", "kg", "yard", "roll");
         foreach ($units as $rec) {
             $typeId = static::getFake()->getFake()->randomElement($unitTypeIds);
             $record = static::createRecord(static::getFake()->createRecordUnit($rec, $typeId));
             $ids[] = $record->id;
         }
     }
     return $ids;
 }
Exemple #2
0
 });
 Route::get('productImage', function () {
     return \Emayk\Ics\Repo\Bankaccount\Bankaccount::createMassiveSampleRecord(false, 100);
     //			$image = new \Emayk\Ics\Support\Dummy\Faker\AbstractGenerate();
     //			$record = $image->createRecordImage(1,'hdsahdsah');
     //			return $record;
     for ($rec = 90; $rec < 100; $rec++) {
         $ids[] = \Emayk\Ics\Repo\Images\Images::getIdsOrCreate($rec, 'dsadhsuadhsua112' . $rec);
     }
     return $ids;
 });
 Route::get('product', function () {
     return \Emayk\Ics\Repo\Products\Products::generateSampleProducts(1000);
 });
 Route::get('unittype', function () {
     return \Emayk\Ics\Repo\Unittypes\Unittypes::getIdsOrCreate();
 });
 Route::get('productcat', function () {
     return \Emayk\Ics\Repo\Productcategory\Productcategory::getIdsOrCreateSampelData();
     //			s(count($cat));
     //			return s($cat);
     //			echo \Emayk\Ics\Repo\Positions\Positions::generateMassiveDataDummy(false,50);
 });
 //		Route::get('banktype', function () {
 //			return \Emayk\Ics\Repo\Bankaccounttype\Bankaccounttype::getDefaultBankTypeIdsOrCreate(true);
 //		});
 Route::get('banks', function () {
     return \Emayk\Ics\Repo\Bank\Bank::getIdsOrCreateBanks();
 });
 /**
  * Generate Colors