ethanclevenger91/brewerydb-php

There is no license information available for the latest version (1.1.0) of this package.

A PHP wrapper for the BreweryDB API

1.1.0 2016-09-25 19:18 UTC

This package is auto-updated.

Last update: 2024-09-07 09:10:20 UTC


README

A Laravel package for interfacing with the BreweryDB (http://brewerydb.com/) API. Uses v2 of the API. Returns JSON.

Installation

Require via Composer:

composer require ethanclevenger91\brewerydb-php

Publish the config:

php artisan vendor:publish

Add your API key in .env:

BREWERYDB_API_KEY=yourkeyhere

Usage

$breweryDb = App::make('brewerydb');
$result = $breweryDb->request('breweries', 'GET', [
  'order' => 'random',
  'randomCount' => 1
]);