PHP code example of networkrailbusinesssystems / maximo-query

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

    

networkrailbusinesssystems / maximo-query example snippets

bash
php artisan vendor:publish --provider="NetworkRailBusinessSystems\MaximoQuery\Providers\MaximoQueryServiceProvider" --tag="config"

$fileOne = $request->fileOne;
$fileTwo = $request->fileTwo;

$response = MaximoQuery::withObjectStructure('trim')
	->withAttachments($fileOne, $fileTwo)
	->create([
		...
	]);


$response = MaximoQuery::withObjectStructure('trim')
	->withAttachments($fileOne, $fileTwo)
	->create(
		[...],
		['href', 'ticketid', 'description']
	);

$response = MaximoQuery::withObjectStructure('trim')
	->where('ticketid', 'DOE12345')
	->update([
		'description' => 'A new title',
	]);

$obj = $response->raw(); 
 
$array = $response->toArray();

$collection = $response->toCollection();

$url = $response->getUrl();

$value = $response->filter('member');

$collection = $response->filter('member', true);

$count = $response->getCount();