PHP code example of lungosoft / document

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

    

lungosoft / document example snippets

`
Route::post('/saleorder/{id}', function (Request $request, $id) {
    //validate saleorder data

    if ($request->has(['header'])) {
        $saleOrder = \App\Repositories\SaleOrderRepository();
        if ($saleOrder->editHeader($id, $request->header)) {
            return response('OK', 200);
        } else {
            return response('OK', 400);
        }
    } else {
        //throw an error, 400 status or do a redirect....
    }
});