dev-master
9999999-devLaravel package for the Device42 API.
MIT
The Requires
The Development Requires
laravel device42
Laravel package for the Device42 API.
Laravel 5 package to interact with the Device42 API. Not all of the Device42 API endpoints are completed. If you need an endpoint added feel free to submit a pull request., (*1)
Install with composer
bash
composer require um-flint/laravel-device42
, (*2)
In config/app.php add the service provider., (*3)
UMFlint/Device42/Device42ServiceProvider::class,
Basic example in a controller:, (*4)
use UMFlint/Device42/Entities/Devices; ... public function getIndex(Devices $devicesEntity) { $devices = $devicesEntity->all(); }
$devices
will return an array like:, (*5)
[ 'Devices' => [ [ 'asset_no' => null, 'device_id' => 34, 'device_url' => '/api/1.0/devices/id/34/', 'name' => '320', 'groups' => 'Prod_East:no, Corp:yes', 'serial_no' => null, 'uuid' => '07FCE572-B2B3-B44C-BB1C-6799B509CC31', ], [ 'asset_no' => null, 'device_id' => 36, 'device_url' => '/api/1.0/devices/id/36/', 'name' => '323p1', 'groups' => 'Prod_East:no, Corp:yes', 'serial_no' => null, 'uuid' => '22D4DEBD-6EAA-D441-89AE-047A9A60E9FB', ], [ 'asset_no' => null, 'device_id' => 39, 'device_url' => '/api/1.0/devices/id/39/', 'name' => 'd250', 'groups' => 'Prod_East:no, Corp:yes', 'serial_no' => null, 'uuid' => '76CE2AFC-58E3-1B4E-AB7A-6FECB480154B', ], [ 'asset_no' => null, 'device_id' => 33, 'device_url' => '/api/1.0/devices/id/33/', 'name' => 'd313p1', 'groups' => 'Prod_East:no, Corp:yes', 'serial_no' => null, 'uuid' => 'BC1E0971-9889-8946-A92B-8F1D830C1AF2', ], ], ]
Laravel package for the Device42 API.
MIT
laravel device42