2017 © Pedro Peláez
 

library eden

image

apipack/eden

  • Thursday, April 10, 2014
  • by taqmaninw
  • Repository
  • 6 Watchers
  • 11 Stars
  • 267 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 3 Open issues
  • 1 Versions
  • 1 % Grown

The README.md

Laravel 4 Apipack

Apipack integrates the api from Eden Framework into to Laravel. For more information, see the Eden Documentation., (*1)

php artisan config:publish apipack/eden

Installation

To get the latest version of Apipack, simply require it in your composer.json file., (*2)

"apipack/eden": "dev-master"

You'll then need to run composer install or composer update to download it and have the autoloader updated., (*3)

Once Apipack is installed, you need to register the service provider with the application. Open up app/config/app.php and find the providers key., (*4)

'providers' => array(

    'Apipack\Eden\EdenServiceProvider'

);

Apipack also ships with a facade which provides the static syntax for creating collections. You can register the facade in the aliases key of your app/config/app.php file., (*5)

'aliases' => array(

    'Google'    => 'Apipack\Eden\Facade\Google',
    'Facebook'  => 'Apipack\Eden\Facade\Facebook',
    'Instagram' => 'Apipack\Eden\Facade\Instagram',

)

Configuration

In the main configuration for Apipack, you can add app credential in this:, (*6)

return array(
    /*
     * App credential 
     *
     */

    'Google' => array(
        'clientID' => '',
        'clientSeceret' => '',
        'redirectUrl' => '',
        'ApiKey' => '',
    ),
    'Facebook'=> array(
        'appkey' => '',
        'appsecret' => '',
        'redirecturl' => '',
    ),
    'Instagram'=>array(
        'clientid' => '',
        'clientsecret' => '',
        'redirecturl' => '',
    ),

);

Simple Usage

$auth = Google::auth();

//if no code and no session
if(!isset($_GET['code']) && !isset($_SESSION['token'])) {
    //redirect to login
    $login = $auth->getLoginUrl('calendar');
    header('Location: '.$login);
    exit;
}

//Code is returned back from google
if(isset($_GET['code'])) {
    //save it to session
    $access = $auth->getAccess($_GET['code']);
    $_SESSION['token'] = $access['access_token'];
}

Todo

  • Amazon
  • Twitter
  • Payapl
  • Foursquare
  • Tumble

Support or Contact

If you have some problem, Contact taqmaninw@gmail.com my site :[www.laraveltut.com], (*7)

The Versions

10/04 2014

dev-master

9999999-dev

  Sources   Download

The Requires

 

by Avatar taqmaninw