PHP code example of lasserafn / php-ordrestyring

1. Go to this page and download the library: Download lasserafn/php-ordrestyring 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/ */

    

lasserafn / php-ordrestyring example snippets


$ordrestyring->cases()
             ->with('hours', 'type')
             ->where('status', 1)
             ->sortDescending()
             ->sortBy('id')
             ->perPage(15)
             ->page(4)
             ->get();

$ordrestyring->users()->find(10);

$ordrestyring->debtors()->first();

$ordrestyring->departments()->where('number', '!=', 19)->all();

$ordrestyring->debtors()->where('id', [1,2,3,4])->get(); // Will get debtors with id 1, 2, 3 and/or 4

$ordrestyring = new LasseRafn\Ordrestyring\Ordrestyring('API-KEY');

$ordrestyring->cases()->get();

use LasseRafn\Ordrestyring\Ordrestyring;

try {
    // try to get something from the api, but nothing is found.
}
catch( LasseRafn\Ordrestyring\Exceptions\RequestException $exception ) {
    echo $exception->message; // could redirect back with the message.
}
`bash
composer