rafaellaurindo/laravel-brasilapi 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

rafaellaurindo/laravel-brasilapi

最新稳定版本:v1.0.4

Composer 安装命令:

composer require rafaellaurindo/laravel-brasilapi

包简介

A Laravel package that provides a simple way to use the Brasil API endpoints

README 文档

README

Latest Stable Version Tests Code Style License Total Downloads

Laravel Brasil API is a simple and elegant package to easily consume Brasil API endpoints within your Laravel applications.

📑 Table of Contents

📦 Installation

Requirements:
This package supports Laravel 8.0 and above.

Install the package via Composer:

composer require rafaellaurindo/laravel-brasilapi

Optionally, you can publish the config file:

php artisan vendor:publish --provider="RafaelLaurindo\BrasilApi\BrasilApiServiceProvider" --tag="config"

🚀 Usage

You can access the package using Dependency Injection, Facade, or Helper.

1. Using Dependency Injection

use RafaelLaurindo\BrasilApi\BrasilApi;

class ExampleController
{
    public function searchZipCode(BrasilApi $brasilApi)
    {
        return response()->json($brasilApi->cep('01431000'));
    }
}

2. Using Facade

use BrasilApi;

BrasilApi::cep('01431000');

3. Using Helper

brasilApi()->getBank(77);

📚 Examples

Make sure you import the Facade when using the examples:

use BrasilApi;

🔎 Search address by zip code

BrasilApi::cep('01431000');

🏦 List Brazilian banks

BrasilApi::getBanks();

🏛️ Get a bank by its code

BrasilApi::getBank(77);

🏢 Find company information by CNPJ

BrasilApi::findCnpj('19131243000197');

✅ Running Tests

To run the package tests, simply execute:

composer test

📋 Changelog

Please refer to the CHANGELOG to learn about updates and changes.

🤝 Contributing

Feel free to read the CONTRIBUTING guide if you want to contribute to this project.

🔐 Security Vulnerabilities

If you discover a security vulnerability, please review our Security Policy for how to report it.

👨‍💻 Credits

📄 License

This package is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 16.55k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-11-12