A module that integrates tomlankhorst/afas-profit
with Laravel.
- PHP 7.2 +
- Laravel 5.5, 5.7, 5.8 (5.6 is EOL)
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'),
],
]
],
],
];
As a facade
$results = Afas::connector('products')
->where('sku', 'LIKE', 'XY%')
->orWhere('sku', 'LIKE', 'XXY%')
->take(10)
->skip(10)
->get();
Thanks to iPublications for developing iPublications/AFAS-ProfitClass-PHP.