gheith3 / omancities
for migrate oman governorates and cities
Fund package maintenance!
:vendor_name
Requires
- php: ^8.0
- illuminate/contracts: ^8.37
- spatie/laravel-package-tools: ^1.9.2
- spatie/laravel-translatable: ^5.0
Requires (Dev)
- nunomaduro/collision: ^5.10
- nunomaduro/larastan: ^1.0
- orchestra/testbench: ^6.22
- pestphp/pest: ^1.10
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.4
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2025-05-16 23:59:36 UTC
README
This repo can be used to scaffold Oman Governorates and cities.
Installation
You can install the package via composer:
composer require gheith3/omancities
publish and run the migrations with:
php artisan vendor:publish --tag="omancities-migrations"
php artisan migrate
seed cities to database:
php artisan omancities:seed
Usage
$governorate = OmanGovernorate::first(); $governorate->load("cities"); echo $governorate->name; //$city = OmanCity::find(10); $city = $governorate->cities()->first(); echo $city->name;
this package is support for spatie/laravel-translatable package
echo $governorate->name; echo $governorate->getTranslation("name", "ar"); echo $governorate->getTranslation("name", "en"); echo $city->getTranslation("name", "ar"); echo $city->getTranslation("name", "en");
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.