gheith3/omancities
Composer 安装命令:
composer require gheith3/omancities
包简介
for migrate oman governorates and cities
README 文档
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.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-11-16