PHP code example of pringgojs / laravel-itop

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

    

pringgojs / laravel-itop example snippets


$itop = new \Pringgojs\LaravelItop\Services\ApiService(
    'https://itop.example.com',
    'admin',
    'secret'
);

$response = $itop->callApi([
    'operation' => 'core/create',
    'class'     => 'UserRequest',
    'fields'    => [/* ... */],
]);

$payload = \Pringgojs\LaravelItop\Services\ItopServiceBuilder::payloadTicketCreate([
    'title' => 'Example',
    // …
]);
bash
php artisan vendor:publish \
    --provider="Pringgojs\LaravelItop\LaravelItopServiceProvider" \
    --tag="config"