There is no license information available for the latest version (dev-master) of this package.

PHP7 Laravel5 component to connect to ServiceNow Table API

dev-master 2020-06-04 05:05 UTC

This package is auto-updated.

Last update: 2020-08-04 05:30:53 UTC


A laravel Model to access service now table api

You are nutz if you use this...ABSolutELY MENtal!👍

Requires Laravel 5.x and GuzzleHttp

How to use :

Set the following variables in your laravel .env file:

'SNOWBASEURL' = https://yourcompany.service-now.com/api/now/v1/table

Create a new model in your Laravel App folder PER table and set $table. Example:



namespace App;

use ohtarr\ServiceNowModel;
use GuzzleHttp\Client as GuzzleHttpClient;

class ServiceNowIncident extends ServiceNowModel
    protected $guarded = [];

    public $table = "incident";

    public function __construct(array $attributes = [])
        $this->snowbaseurl = env('SNOWBASEURL'); //https://mycompany.service-now.com/api/now/v1/table
        $this->snowusername = env("SNOWUSERNAME");
        $this->snowpassword = env("SNOWPASSWORD");


and in your application you can utilize it :

$incident = new App\ServiceNowIncident;


$incident = App\ServiceNowIncident::where("number","=","INC2321232")->first()


$incident = App\ServiceNowIncdient::find("1782fd1d6fcb87005d6dcd364b3ee4c1");

or if you are brave:

$incidents = App\ServiceNowIncident::all();