PHPackages                             kylewlawrence/laravel-bunny-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. kylewlawrence/laravel-bunny-api

ActiveLibrary[API Development](/categories/api)

kylewlawrence/laravel-bunny-api
===============================

Laravel API for Bunny

01PHP

Since Aug 26Pushed 2y ago1 watchersCompare

[ Source](https://github.com/KyleWLawrence/laravel-bunny-api)[ Packagist](https://packagist.org/packages/kylewlawrence/laravel-bunny-api)[ RSS](/packages/kylewlawrence-laravel-bunny-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Bunny
=============

[](#laravel-bunny)

This package provides integration with the Bunny API. It currently only supports sending a chat message.

Installation
------------

[](#installation)

You can install this package via Composer using:

```
composer require kylewlawrence/laravel-bunny-api
```

The facade is automatically installed.

```
Bunny::get('zones', ['per_page' => 100]);
```

Configuration
-------------

[](#configuration)

To publish the config file to `app/config/bunny-laravel.php` run:

```
php artisan vendor:publish --provider="KyleWLawrence\Bunny\Providers\BunnyServiceProvider"
```

Set your configuration using **environment variables**, either in your `.env` file or on your server's control panel:

- `BUNNY_ACCESS_KEY`

The API access AccessKey. You can create one as described here: `https://dash.bunny.net/account/settings`

- `BUNNY_DRIVER` *(Optional)*

Set this to `null` or `log` to prevent calling the Bunny API directly from your environment.

Contributing
------------

[](#contributing)

Pull Requests are always welcome here. I'll catch-up and develop the contribution guidelines soon. For the meantime, just open and issue or create a pull request.

Usage
-----

[](#usage)

### Facade

[](#facade)

The `Bunny` facade acts as a wrapper for an instance of the `Bunny\Http\HttpClient` class.

### Dependency injection

[](#dependency-injection)

If you'd prefer not to use the facade, you can instead inject `KyleWLawrence\Bunny\Services\BunnyService` into your class. You can then use all of the same methods on this object as you would on the facade.

```
