PHPackages                             rysonliu/laravel-zabbix-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rysonliu/laravel-zabbix-api

ActiveLibrary[API Development](/categories/api)

rysonliu/laravel-zabbix-api
===========================

This package provides a Zabbix API library for Laravel Framework

v1.3.1(2y ago)029MITPHP

Since Oct 7Pushed 4mo agoCompare

[ Source](https://github.com/rysonliu/laravel-zabbix-api)[ Packagist](https://packagist.org/packages/rysonliu/laravel-zabbix-api)[ RSS](/packages/rysonliu-laravel-zabbix-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

Laravel Zabbix API
------------------

[](#laravel-zabbix-api)

This package provides a Zabbix API library for Laravel Framework. It uses the PhpZabbixApi class generated by the  package.

> **NOTE:** This version was tested with Zabbix Server 3.0.\* only. Not sure if it works with other versions as well.

[![Buy Me A Coffee](https://camo.githubusercontent.com/0cf29a542375e1a46e84d8bf5805a4e5c0a6ee98b6547ccdc0c55eed49d99c69/68747470733a2f2f63646e2e6275796d6561636f666665652e636f6d2f627574746f6e732f76322f64656661756c742d79656c6c6f772e706e67)](https://www.buymeacoffee.com/vbecker)

#### Installation

[](#installation)

To get started, you should add the `becker/laravel-zabbix-api` Composer dependency to your project:

```
composer require rysonliu/laravel-zabbix-api
```

#### Register the Service Provider

[](#register-the-service-provider)

> **NOTE:** You can skip this step if you are using Laravel 5.5 or higher. The package is automatically registered, due to the package auto-discovery feature.

Open up the `config/app.php`and register the new Service Provider:

```
//config/app.php

/*
 * Package Service Providers...
 */

Becker\Zabbix\ZabbixServiceProvider::class,

//...
```

#### Publish the configuration file

[](#publish-the-configuration-file)

```
php artisan vendor:publish --tag=zabbix
```

This will create the `config/zabbix.php` file.

#### Configure your Zabbix Server settings

[](#configure-your-zabbix-server-settings)

At your `.env` file, define the new Zabbix settings:

```
ZABBIX_HOST=http://your.zabbix.url
ZABBIX_USERNAME=username
ZABBIX_PASSWORD=password
```

> **IMPORTANT:** The `ZABBIX_HOST` parameter **SHOULD NOT** contain any trailing slashes at the end. For a list of all available environment variables, check the `config/zabbix.php` file.

#### Use it in your Controller

[](#use-it-in-your-controller)

```
//app/Http/Controllers/TestController.php
