2017 © Pedro Peláez
 

package laravel-device42

Laravel package for the Device42 API.

image

um-flint/laravel-device42

Laravel package for the Device42 API.

  • Thursday, August 25, 2016
  • by dowilcox
  • Repository
  • 7 Watchers
  • 2 Stars
  • 363 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel Device42

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)

Installation

Install with composer bash composer require um-flint/laravel-device42, (*2)

Register the package

In config/app.php add the service provider., (*3)

UMFlint/Device42/Device42ServiceProvider::class,

Example usage

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',
                    ],
                ],
        ]

The Versions

25/08 2016

dev-master

9999999-dev

Laravel package for the Device42 API.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel device42