bigperson / laravel-exchange1c
1C 目录加载器 - 使用laravel的CommerceML
2.2.1
2023-12-02 19:54 UTC
Requires
- php: >=7.1
- bigperson/exchange1c: ^1.1
- laravel/framework: ^5.4|^6.0|^7.0|^8.0|^9.0|^10.0
Requires (Dev)
- mockery/mockery: ^1.2
- orchestra/testbench: ~3.0
- phpunit/phpunit: ^7
This package is auto-updated.
Last update: 2024-08-31 00:45:08 UTC
README
该包被认为简化了1C企业和基于Laravel网站之间的集成。该包在本质上是一个连接Laravel和https://github.com/bigperson/exchange1c的桥梁。
安装
安装依赖
composer require bigperson/laravel-exchange1c
对于Laravel 5.4及以下版本
在config/app.php
中添加服务提供者Exchange1CServiceProvider
Bigperson\LaravelExchange1C\Exchange1CServiceProvider::class
发布配置
php artisan vendor:publish --provider="Bigperson\LaravelExchange1C\Exchange1CServiceProvider"
使用
您需要在配置中指定登录名、密码、自己的模型,并实现相应的接口
\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模块的文档。同时,您还需要配置1C企业
订阅事件
您可以订阅bigperson/exchange1c包内部调用的任何事件
'Bigperson\Exchange1C\Events\BeforeOffersSync' => [ 'App\Listeners\BeforeOffersSyncListener', ],
许可证
该包是在MIT许可证下开源的。