定制 ohtarr/service-now-model 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ohtarr/service-now-model

Composer 安装命令:

composer require ohtarr/service-now-model

包简介

PHP7 Laravel5 component to connect to ServiceNow Table API

README 文档

README

A laravel Model to access service now table api

You are nutz if you use this...ABSolutELY MENtal!:+1:

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
'SNOWUSERNAME' =
'SNOWPASSWORD' =

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

ServiceNowIncident.php******

<?php

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");
        parent::__construct($attributes);
    }

}

and in your application you can utilize it :

$incident = new App\ServiceNowIncident;
$incident->where("number","=","INC2321232")->get();

or

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

or

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

or if you are brave:

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

统计信息

  • 总下载量: 5.42k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 3
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2017-12-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固