-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ability to more advanced use of stored data
- Loading branch information
Showing
11 changed files
with
4,368 additions
and
72 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 @@ | ||
vendor/ |
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 |
---|---|---|
@@ -1,13 +1,18 @@ | ||
This package provides a command for pre-loading Nova Poshta warehouses and class for working with it. | ||
|
||
## Usage | ||
## Installation | ||
|
||
1. Install package by `composer require scary-layer/nova-poshta`. | ||
1. Add command `php artisan nova-poshta:load` to crontab. | ||
Documentation of Nova Poshta API recommends to do it daily. | ||
If you just started development, run this command single time to warehouses be loaded. | ||
1. Use `ScaryLayer\NovaPoshta\NovaPoshta` class to work with loaded data. | ||
1. Add command `php artisan nova-poshta:load` to crontab. | ||
|
||
Documentation of Nova Poshta API recommends to do it daily. | ||
|
||
If you just started development, run this command single time to warehouses to be loaded. | ||
|
||
## Using | ||
Use `ScaryLayer\NovaPoshta\NovaPoshta` class to work with loaded data. | ||
Currently it contain methods: | ||
- `getCities` - to get array of available cities like [$cityId => $cityName] | ||
- `getWarehouses` - to get array of available warehouses like [$warehouseId => $warehouseName] | ||
If you need to do more advanced work with if, you may just write your own data processor for `storage/app/nova-poshta` json files. | ||
- `getCities` - to get array of available cities like [$cityRef => $cityDescription] | ||
- `getWarehouses` - to get array of available warehouses like [$warehouseRef => $warehouseDescription] | ||
|
||
Or you may use `ScaryLayer\NovaPoshta\Repositories\City` and `ScaryLayer\NovaPoshta\Repositories\Warehouse` to more advanced work with stored data. |
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
Oops, something went wrong.