-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c20eb72
commit 5b5f9b9
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
Laravel курсы валют | ||
=================== | ||
|
||
[](https://packagist.org/packages/liquetsoft/cbrfservice-laravel) | ||
[](https://packagist.org/packages/liquetsoft/cbrfservice-laravel) | ||
[](https://packagist.org/packages/liquetsoft/cbrfservice-laravel) | ||
[](https://github.com/liquetsoft/cbrfservice-laravel/actions?query=workflow%3A%22cbrfservice_laravel%22) | ||
|
||
Laravel бандл для [liquetsoft/cbrfservice](https://github.com/liquetsoft/cbrfservice). | ||
|
||
|
||
|
||
Установка | ||
--------- | ||
|
||
1. Установить пакет с помощью composer: | ||
|
||
```bash | ||
composer require liquetsoft/cbrfservice-laravel | ||
``` | ||
|
||
2. Бандл зарегистрируется автоматически с помощью `Package Discovery`. | ||
|
||
|
||
|
||
Использование | ||
------------- | ||
|
||
Сервис можно получить с помощью [Service Container](https://laravel.com/docs/10.x/container). | ||
|
||
```php | ||
<?php | ||
namespace App\Http\Controllers; | ||
use App\Models\User; | ||
use Illuminate\Support\Collection; | ||
use Liquetsoft\CbrfService\Laravel\CbrfDailyWrapper; | ||
class UserController extends Controller | ||
{ | ||
public function __construct( | ||
private readonly CbrfDailyWrapper $cbrfDaily, | ||
) {} | ||
public function getEnumValutes(): Collection | ||
{ | ||
return $this->cbrfDaily->enumValutes(); | ||
} | ||
} | ||
``` | ||
|
||
|
||
|
||
Методы | ||
------ | ||
|
||
Описание методов находится на [сайте банка России](https://www.cbr.ru/development/DWS/). |