Created
June 19, 2018 04:11
-
-
Save iZaL/2e0630fa6410f63accb7166d2e676792 to your computer and use it in GitHub Desktop.
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 | |
public function test() | |
{ | |
$kuwaitCityLocations = [ | |
'Abdullah al-Salem', | |
'Adailiya', | |
'Bneid Al Qar', | |
'Daiya', | |
'Dasma', | |
'Dasman', | |
'Faiha', | |
'Granada', | |
'Jaber Al Ahmad', | |
'Jibla', | |
'Kaifan', | |
'Khaldiya', | |
'Kuwait City', | |
'Kuwait Free Trade Zone', | |
'Mansouriya', | |
'Mirqab', | |
'Mubarekiya Camps and Collages', | |
'Nahdha', | |
'North West Al-Sulaibikhat', | |
'Nuzha', | |
'Qadsiya', | |
'Qairawan', | |
'Qortuba', | |
'Rawda', | |
'Salhiya', | |
'Shamiya', | |
'Sharq', | |
'Shuwaikh Administrative', | |
'Shuwaikh Industrial', | |
'Shuwaikh Industrial 1', | |
'Shuwaikh Industrial 2', | |
'Shuwaikh Industrial 3', | |
'Shuwaikh Residential', | |
'Sulaibikhat', | |
'Surra', | |
'Yarmouk', | |
]; | |
$farwaniyaLocations = [ | |
'Abbasiya', | |
'Abdullah Al Mubarak Al Sabah', | |
'Abraq Khaitan', | |
'Airport', | |
'Al-Dajeej', | |
'Al-Shadadiya', | |
'Andalous', | |
'Ardiya', | |
'Ardiya Small Industrial', | |
'Ardiya Storage Zone', | |
'Doha', | |
'Farwaniya', | |
'Firdous', | |
'Ishbiliya', | |
'Jeleeb Al-Shuyoukh', | |
'Khaitan', | |
'Kuwait International Airport', | |
'Omariya', | |
'Rabia', | |
'Rai', | |
'Rehab', | |
'Rigai', | |
'Sabah Al Nasser', | |
'Sheikh Saad Aviation Terminal', | |
'South Khaitan - Exhibits', | |
]; | |
$mubarakLocations = [ | |
'Abu Al Hasaniya', | |
'Abu Fatira', | |
'Adan', | |
'Al-Masayel', | |
'Coast Strip B', | |
'Fnaitees', | |
'Messila', | |
'Mubarak Al Kabeer', | |
'Qurain', | |
'Qusor', | |
'Sabah Al Salem', | |
'Sabhan Industrial Area', | |
'South Wista', | |
'West Abu Fatira Small Industrial', | |
'Wista', | |
]; | |
$hawallyLocations = [ | |
'Al-Bidea', | |
'Al-Siddeeq', | |
'Anjafa', | |
'Bayan', | |
'Hateen', | |
'Hawally', | |
'Jabriya', | |
'Maidan Hawally', | |
'Mishref', | |
'Mubarak Al-Abdullah', | |
'Rumaithiya', | |
'Salam', | |
'Salmiya', | |
'Salwa', | |
'Shaab', | |
'Shuhada', | |
'Zahra', | |
]; | |
$ahmadiLocations = [ | |
'Abu Halifa', | |
'Ahmadi', | |
'Al Khiran', | |
'Al Wafrah', | |
'Al-Julaia', | |
'Al-Nuwaiseeb', | |
'Al-Riqqa', | |
'Ali Sabah Al Salem', | |
'Assabahiyah', | |
'Bnaider', | |
'Dahar', | |
'Eqaila', | |
'Fahad Al Ahmad', | |
'Fahaheel', | |
'Fintas', | |
'Hadiya', | |
'Jaber Al Ali', | |
'Mahboula', | |
'Mangaf', | |
'Sabah Al Ahmad', | |
'Shalayhat Al Dubaiya', | |
'Shalayhat Mina Abdullah', | |
'Shuaiba Block 1', | |
'West Industrial Shuaiba', | |
'Zour', | |
]; | |
$jahraLocations = [ | |
'Al Sulaibiya Industrial 1', | |
'Al Sulaibiya Industrial 2', | |
'Amgarah Industrial Area', | |
'Jahra', | |
'Naeem', | |
'Naseem', | |
'Oyoun', | |
'Qasr', | |
'Saad Al Abdullah', | |
'Sulaibiya', | |
'Taima', | |
'Waha', | |
]; | |
$kuwaitCity = Area::create([ | |
'country_id' => 1, | |
'parent_id' => null, | |
'name_en' => 'Kuwait City', | |
'name_ar' => 'مدينة الكويت', | |
'active' => 1 | |
]); | |
$farwaniya = Area::create([ | |
'country_id' => 1, | |
'parent_id' => null, | |
'name_ar' => 'فروانية', | |
'name_en' => 'Farwaniya', | |
'active' => 1 | |
]); | |
$hawally = Area::create([ | |
'country_id' => 1, | |
'parent_id' => null, | |
'name_ar' => 'حولي', | |
'name_en' => 'Hawally', | |
'active' => 1 | |
]); | |
$mubarak = Area::create([ | |
'country_id' => 1, | |
'parent_id' => null, | |
'name_ar' => 'مبارك الكبير', | |
'name_en' => 'Mubarak Al Kabir', | |
'active' => 1 | |
]); | |
$ahmadi = Area::create([ | |
'country_id' => 1, | |
'parent_id' => null, | |
'name_ar' => 'أحمدي', | |
'name_en' => 'Ahmadi', | |
'active' => 1 | |
]); | |
$jahra = Area::create([ | |
'country_id' => 1, | |
'parent_id' => null, | |
'name_ar' => 'جهراء', | |
'name_en' => 'Jahra', | |
'active' => 1 | |
]); | |
foreach($kuwaitCityLocations as $location) { | |
$area = Area::create([ | |
'country_id' => 1, | |
'parent_id' => $kuwaitCity->id, | |
'name_ar' => $location, | |
'name_en' => $location, | |
'active' => 1 | |
]); | |
} | |
foreach($farwaniyaLocations as $location) { | |
$area = Area::create([ | |
'country_id' => 1, | |
'parent_id' => $farwaniya->id, | |
'name_ar' => $location, | |
'name_en' => $location, | |
'active' => 1 | |
]); | |
} | |
foreach($hawallyLocations as $location) { | |
$area = Area::create([ | |
'country_id' => 1, | |
'parent_id' => $hawally->id, | |
'name_ar' => $location, | |
'name_en' => $location, | |
'active' => 1 | |
]); | |
} | |
foreach($mubarakLocations as $location) { | |
$area = Area::create([ | |
'country_id' => 1, | |
'parent_id' => $mubarak->id, | |
'name_ar' => $location, | |
'name_en' => $location, | |
'active' => 1 | |
]); | |
} | |
foreach($ahmadiLocations as $location) { | |
$area = Area::create([ | |
'country_id' => 1, | |
'parent_id' => $ahmadi->id, | |
'name_ar' => $location, | |
'name_en' => $location, | |
'active' => 1 | |
]); | |
} | |
foreach($jahraLocations as $location) { | |
$area = Area::create([ | |
'country_id' => 1, | |
'parent_id' => $jahra->id, | |
'name_ar' => $location, | |
'name_en' => $location, | |
'active' => 1 | |
]); | |
} | |
dd(Area::pluck('name_en')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment