Skip to content

Instantly share code, notes, and snippets.

@fordarnold
Created February 12, 2015 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fordarnold/9d9b6fec55f78b160482 to your computer and use it in GitHub Desktop.
Save fordarnold/9d9b6fec55f78b160482 to your computer and use it in GitHub Desktop.
Telecom network extensions for Africa
<?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