Created
February 12, 2015 14:40
-
-
Save fordarnold/9d9b6fec55f78b160482 to your computer and use it in GitHub Desktop.
Telecom network extensions for Africa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Start somewhere ! | |
class TelecomNetworkExtensionsTableSeeder extends Seeder { | |
public function run() | |
{ | |
$faker = Faker::create(); | |
$network_extensions = [ | |
'Airtel Uganda' => '075', | |
'MTN Uganda' => '077', | |
'MTN Uganda' => '078', | |
'Africell (Orange) Uganda' => '079', | |
'Airtel (Warid) Uganda' => '070', | |
'Uganda Telecom' => '071' | |
]; | |
foreach($network_exts as $name => $extension) | |
{ | |
NetworkExtensions::create([ | |
'name' => '', | |
'identifier' => dechex( mt_rand(100000000, 999999999) ), | |
'name' => $faker->company . ' (Franchise) Ltd.', | |
'location' => $faker->address, | |
'phone_ext' => 256, | |
'phone_no' => $network_exts[array_rand($network_exts, 1)] . mt_rand(1, 9) . mt_rand(100000, 999999), | |
]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment