tomlankhorst / laravel-afas
Laravel package around 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
A module that integrates tomlankhorst/afas-profit
with Laravel.
Requirements
- PHP 7.2 +
- Laravel 5.5, 5.7, 5.8 (5.6 is EOL)
Configuration
composer require tomlankhorst/laravel-afas ^1.0
Add an afas.php
configuration file.
<?php return [ 'connections' => [ 'default' => [ 'location' => env('AFAS_LOCATION'), 'connectors' => [ 'products' => [ 'id' => env('AFAS_PRODUCTS_CONNECTOR'), 'environment' => env('AFAS_ENVIRONMENT'), 'token' => env('AFAS_TOKEN'), ], ] ], ], ];
Usage
As a facade
$results = Afas::connector('products') ->where('sku', 'LIKE', 'XY%') ->orWhere('sku', 'LIKE', 'XXY%') ->take(10) ->skip(10) ->get();
Credits
Thanks to iPublications for developing iPublications/AFAS-ProfitClass-PHP.