承接 abdomassoun/algeria-wilayas 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

abdomassoun/algeria-wilayas

最新稳定版本:0.7.0

Composer 安装命令:

composer require abdomassoun/algeria-wilayas

包简介

This package is designed to help Laravel developers integrate wilayas data into their projects in the easiest way possible. It includes an enum of wilayas and provides the ability to create a table that includes all the data of wilayas with their information (optional to create a table of wilayas).

README 文档

README

Stable Version Latest Release License

This package is designed to help Laravel developers integrate wilayas data into their projects in the easiest way possible. It includes an enum of wilayas and provides the ability to create a table that includes all the data of wilayas with their information (optional to create a table of wilayas). It also includes a Wilaya model (class).

Usage

Here are the step-by-step instructions on how to install:

  1. Run the following command to install the package:

    composer require abdomassoun/algeria-wilayas

    This command will add the Wilaya class to your project, along with a migration for it. It will also create an enum called WilayaEnum which includes various functions to work with the enum.

  2. (Optional) If you want to create a database seed, run the following command:

    php artisan vendor:publish --tag=seeders

    This command will publish the seeders for the package, allowing you to seed the wilayas data into your database.

  3. You can now use the Wilaya class and the WilayaEnum enum in your Laravel project. Here's an example of how to use the enum:

    use App\Enums\WilayaEnum;
    
    // Get all wilayas
    $wilayas = WilayaEnum::all();
    
    // Get the name of a wilaya by its code
    $wilayaName = WilayaEnum::getNameByCode('01');
    
    // Get the code of a wilaya by its name
    $wilayaCode = WilayaEnum::getCodeByName('Adrar');

    Feel free to explore the Wilaya class and the WilayaEnum enum to discover more functions and features.

    For more information, please refer to the package documentation.

Contributing

We welcome and encourage contributions to further develop this package. We appreciate any help and ideas. Please check the issues to see how you can contribute.

License

This package is licensed under the MIT License (MIT).

统计信息

  • 总下载量: 12
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-05-03