Looking to hire Laravel developers? Try LaraJobs

laravel-egypt-governorates maintained by mohamed-haroun

Description
The 27 Egyptian governorates (Arabic and English) with slugs, a Laravel validation rule and a select-options helper.
Author
Mohamed Haroun
Last update
2026/12/02 10:10 (dev-main)
License
Links
Downloads
0

Comments
comments powered by Disqus

laravel-egypt-governorates

The 27 Egyptian governorates, in Arabic and English, with stable slugs. Built for checkout forms, shipping zones and address validation.

العربية | English

composer require mohamed-haroun/laravel-egypt-governorates

Use

use MohamedHaroun\EgyptGovernorates\Governorates;

Governorates::name('cairo');          // القاهرة
Governorates::name('cairo', 'en');    // Cairo
Governorates::options();              // ['cairo' => 'القاهرة', ...] for a <select>
Governorates::has('giza');            // true
Governorates::slugs();                // 27 slugs

Validation rule:

use MohamedHaroun\EgyptGovernorates\Rules\Governorate;

$request->validate([
    'governorate' => ['required', new Governorate()],
]);

Shipping fees per governorate: key your own table by the slug.

$fees = ['cairo' => 40, 'giza' => 40, 'alexandria' => 55 /* ... */];
$fee = $fees[$request->governorate] ?? null;

The data lives in src/Governorates.php as a plain constant, so it has no database, no migration and no network calls.

بالعربي

حزمة فيها محافظات مصر الـ27 بالعربي والإنجليزي مع slug ثابت لكل محافظة. مناسبة لصفحة إتمام الطلب وحساب الشحن والتحقق من العنوان.

composer require mohamed-haroun/laravel-egypt-governorates
Governorates::options();   // قايمة جاهزة للـ select
'governorate' => ['required', new Governorate()],

Tests

composer install && vendor/bin/phpunit

License

MIT