PHP code example of realsoftgt / sap-b1-sl

1. Go to this page and download the library: Download realsoftgt/sap-b1-sl library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

realsoftgt / sap-b1-sl example snippets


    RealSoft\SAPBOSL\SAPBOSLServiceProvider::class

    'SAPClient' => RealSoft\SAPBOSL\SAPClient::class,

    use RealSoft\SAPBOSL\SAPClient;

    $sap = SAPClient::createSession(config('username'), config('password'), config('company_db'));

    $session = $sap->getSession();

    $sap = new SAPClient(config('SAP') ,$session);
    $orders = $sap->getService('Orders');
    $result = $orders->queryBuilder()
    ->select('DocEntry,DocNum')
    ->orderBy('DocNum', 'asc')
    ->limit(5)
    ->findAll();
shell
    php artisan vendor:publish --provider="RealSoft\SAPBOSL\SAPBOSLServiceProvider"
shell
    php artisan config:cache