norse-blue / laravel-banxico
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.5
- illuminate/http: ^10.0
- spatie/laravel-package-tools: ^1.14
Requires (Dev)
- laravel/pint: ^1.6
- nunomaduro/larastan: ^2.5
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/phpstan: ^1.10
- spatie/laravel-settings: ^2.8
Suggests
- spatie/laravel-settings: Required to use a settings class instead of config values. Supported version: ^2.8
This package is auto-updated.
Last update: 2024-11-13 18:44:26 UTC
README
Laravel Banxico
Laravel Banxico is a Laravel package that contains an HTTP Client implementation for Banxico's SIE API to request series data and metadata.
Installation
Requirements:
Install this package using Composer:
composer require norse-blue/laravel-banxico
You can publish the config file with:
php artisan vendor:publish --provider="NorseBlue\LaravelBanxico\BanxicoServiceProvider" --tag="settings"
Using Spatie\LaravelSettings package for configuration is also possible.
Usage
The easiest way to use the package is with the facade:
Banxico::getSeriesData( BanxicoSeries::combine( BanxicoSeries::ExchangeRate_USD_SettleObligationsDate, BanxicoSeries::ExchangeRate_EUR_BasketSDR, ), now()->subDays(7), now(), );
This example retrieves the last 7 days of data for the specified series.
Changelog
Please refer to the CHANGELOG.md file for more information about what has changed recently.
Contributing
Contributions to this project are accepted and encouraged. Please read the CONTRIBUTING.md file for details on contributions.
Credits
Security
Please review our security policy to know how to report security vulnerabilities within this package.
Support the development
Do you like this project? Support it by donating
License
This package is open-sourced software licensed under the MIT license.