2017 © Pedro Peláez
 

library lolapi-4-laravel

League of Legends API Service Provider for Laravel 4

image

josephting/lolapi-4-laravel

League of Legends API Service Provider for Laravel 4

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

League of Legends wrapper for Laravel 4

[DEPRECATED] This repo is no longer maintained. Migrate to LeaguePHP/LeagueWrap.

lolapi-4-laravel is a simple laravel 4 service provider (wrapper) for paquettg/leaguewrap which aims to assist application development that depends on the League of Legends API easily., (*1)


Installation

Add lolapi-4-laravel to your composer.json file:, (*2)

"require": {
  "josephting/lolapi-4-laravel": "dev-master"
}

Use composer to install this package., (*3)

$ composer update

Registering the Package

Register the service provider within the providers array found in app/config/app.php:, (*4)

'providers' => array(
    // ...

    'Josephting\LolApi\LolApiServiceProvider',
)

Add an alias within the aliases array found in app/config/app.php:, (*5)

'aliases' => array(
    // ...

    'LolApi'          => 'Josephting\LolApi\Facade\LolApi',
)

Configuration

There are two ways to configure lolapi-4-laravel. You can choose the most convenient way for you. You can use package config file which can be generated through command line by artisan (option 1) or you can simply create a config file called lolapi-4-laravel.php in your app\config\ directory (option 2)., (*6)

Option 1

Create configuration file for package using artisan command, (*7)

$ php artisan config:publish josephting/lolapi-4-laravel

Option 2

Create configuration file manually in config directory app/config/lolapi-4-laravel.php and put there code from below., (*8)

<?php

return array(

    'api_key' => ''

);

Credentials

Add your credentials to app/config/packages/josephting/lolapi-4-laravel/config.php or app/config/lolapi-4-laravel.php (depending on which option of configuration you choose), (*9)

Usage

Basic usage

You can simply load up the API with:, (*10)

$api = LolApi:Api();

It is possible to override the ApiKey in config by passing in a parameter:, (*11)

$api = LolApi:Api('YOUR_API_KEY');

Usage examples:

For more examples go here, (*12)

The Versions

14/02 2015

dev-master

9999999-dev https://github.com/josephting/lolapi-4-laravel

League of Legends API Service Provider for Laravel 4

  Sources   Download

MIT

The Requires

 

laravel api php league legends

22/09 2014

1.0.0

1.0.0.0 https://github.com/josephting/lolapi-4-laravel

League of Legends API Service Provider for Laravel 4

  Sources   Download

MIT

The Requires

 

laravel api php league legends