tomlankhorst / laravel-afas
Laravel 包,围绕 tomlankhorst/afas-profit
1.2.0
2019-10-26 07:37 UTC
Requires
- php: ^7.2
- guzzlehttp/guzzle: ^6.3
- illuminate/contracts: 5.5.*|5.6.*|5.7.*|5.8.*|6.*
- illuminate/support: 5.5.*|5.6.*|5.7.*|5.8.*|6.*
- tomlankhorst/afas-profit: ^0.2.2
Requires (Dev)
- orchestra/testbench: ^3.7
- phpunit/phpunit: ^8.0
README
一个将 tomlankhorst/afas-profit 集成到 Laravel 的模块。
要求
- PHP 7.2+
- Laravel 5.5, 5.7, 5.8 (5.6 已停止支持)
配置
composer require tomlankhorst/laravel-afas ^1.0
添加一个 afas.php 配置文件。
<?php return [ 'connections' => [ 'default' => [ 'location' => env('AFAS_LOCATION'), 'connectors' => [ 'products' => [ 'id' => env('AFAS_PRODUCTS_CONNECTOR'), 'environment' => env('AFAS_ENVIRONMENT'), 'token' => env('AFAS_TOKEN'), ], ] ], ], ];
用法
作为外观
$results = Afas::connector('products') ->where('sku', 'LIKE', 'XY%') ->orWhere('sku', 'LIKE', 'XXY%') ->take(10) ->skip(10) ->get();
致谢
感谢 iPublications 开发 iPublications/AFAS-ProfitClass-PHP。