Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bigperson/laravel-exchange1c
Package for integration site on Laravel and 1C
https://github.com/bigperson/laravel-exchange1c
Last synced: about 2 months ago
JSON representation
Package for integration site on Laravel and 1C
- Host: GitHub
- URL: https://github.com/bigperson/laravel-exchange1c
- Owner: bigperson
- License: mit
- Created: 2018-10-23T14:28:41.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-02T19:55:51.000Z (about 1 year ago)
- Last Synced: 2024-10-03T12:39:33.476Z (3 months ago)
- Language: PHP
- Size: 36.1 KB
- Stars: 33
- Watchers: 3
- Forks: 23
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel exchange 1c
![Packagist](https://img.shields.io/packagist/l/bigperson/laravel-exchange1c.svg?style=flat-square)
[![Packagist](https://img.shields.io/packagist/dt/bigperson/laravel-exchange1c.svg?style=flat-square)](https://packagist.org/packages/bigperson/laravel-exchange1c)
[![Packagist](https://img.shields.io/packagist/v/bigperson/laravel-exchange1c.svg?style=flat-square)](https://packagist.org/packages/bigperson/laravel-exchange1c)
[![Travis (.org)](https://img.shields.io/travis/bigperson/laravel-exchange1c.svg?style=flat-square)](https://travis-ci.org/bigperson/laravel-exchange1c)
[![Codecov](https://img.shields.io/codecov/c/github/bigperson/laravel-exchange1c.svg?style=flat-square)](https://codecov.io/gh/bigperson/laravel-exchange1c)
[![StyleCI](https://github.styleci.io/repos/154342667/shield?branch=master)](https://github.styleci.io/repos/154342667)Пакет признан облегчить интеграцию 1с предприятия и сайта на laravel. Пакет является по сути мостом между laravel и пакетом https://github.com/bigperson/exchange1c.
## Установка
Установить зависимости
```
composer require bigperson/laravel-exchange1c
```### Для Laravel 5.4 и ниже
Добавить сервис провайдер Exchange1CServiceProvider в `config/app.php`
```php
Bigperson\LaravelExchange1C\Exchange1CServiceProvider::class
```
### Опубликовать конфиги
```
php artisan vendor:publish --provider="Bigperson\LaravelExchange1C\Exchange1CServiceProvider"
```
## Использование
Вам необходимо в конфиге указать, логин, пароль, свои модели и реализовать соответсвующие интерфейсы
```php
\Bigperson\Exchange1C\Interfaces\GroupInterface::class => \App\Models\Category::class,
\Bigperson\Exchange1C\Interfaces\ProductInterface::class => \App\Models\Product::class,
\Bigperson\Exchange1C\Interfaces\OfferInterface::class => \App\Models\Offer::class,
```
Подробнее о методах, которые необходимо реализовать можно прочитать в документации к модулю [carono/yii2-1c-exchange]((https://github.com/carono/yii2-1c-exchange#%D0%98%D0%BD%D1%82%D0%B5%D1%80%D1%84%D0%B5%D0%B9%D1%81%D1%8B))
Также необходимо [настроить 1С предприятие](https://github.com/carono/yii2-1c-exchange#%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0-1%D0%A1)### Подписка на события
Вы можете подписаться на любое событие вызываемое внутри пакета [bigperson/exchange1c](https://github.com/bigperson/exchange1c/tree/master/src/Events)
```php
'Bigperson\Exchange1C\Events\BeforeOffersSync' => [
'App\Listeners\BeforeOffersSyncListener',
],
```# Лицензия
Данный пакет является открытым кодом под лицензией [MIT license](LICENSE).