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

ActiveLibrary

alexdeoliveira/laravel-zabbix-api
=================================

This package provides a Zabbix API library for Laravel Framework

0.3.1(5y ago)029MITPHP

Since Sep 27Pushed 5y agoCompare

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

READMEChangelogDependencies (1)Versions (5)Used By (0)

Project fork
------------

[](#project-fork)

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 `alexdeoliveira/laravel-zabbix-api` Composer dependency to your project:

```
composer require alexdeoliveira/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...
 */

Alexdeoliveira\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
