PHPackages                             davigs/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. davigs/laravel-zabbix-api

ActiveLibrary[API Development](/categories/api)

davigs/laravel-zabbix-api
=========================

This package provides a Zabbix API library for Laravel Framework

0.3.1(5y ago)0115MITPHP

Since Sep 27Pushed 5y agoCompare

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

READMEChangelog (1)Dependencies (1)Versions (5)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.

#### Installation

[](#installation)

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

```
composer require becker/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
