2017 © Pedro Peláez
 

library shopify

image

kevdotbadger/shopify

  • Monday, October 10, 2016
  • by kevdotbadger
  • Repository
  • 0 Watchers
  • 0 Stars
  • 30 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Quickguide

  • Add Shopify\Providers\ShopifyServiceProvider::class, to your providers array.
  • Run php artisan vendor:publish --provider="Shopify\Providers\ShopifyServiceProvider" --tag="config" to create a shopify.php config file, and fill out the API vars (defaults to looking in the .env file).

To install an app (redirect the user to the install page), setup a route like /auth/redirect with:, (*1)

$url = $auth->asShop('kevinruscoe')
        ->withScopes(['read_products', 'write_products'])
        ->redirectingTo(route('auth.callback'))
        ->requestAccess();

return redirect(url($url));     

Once the user has accepted the Shopify install T+C, and are redirected back to your app, in that route (like /auth/callback) do, (*2)

$token = $auth->requestAccessToken($request);

return redirect(url('products'));

Now, any controller that needs Shopify, add the HasShopify trait, then you can do somthing like, (*3)

$this->shopify()->Product->all(), (*4)

The Versions

10/10 2016

dev-master

9999999-dev

  Sources   Download

The Requires

 

10/10 2016

dev-rewrite

dev-rewrite

  Sources   Download

The Requires

 

10/12 2015

0.1-alpha

0.1.0.0-alpha

  Sources   Download

The Requires