kevdotbadger/shopify
最新稳定版本:0.1-alpha
Composer 安装命令:
composer require kevdotbadger/shopify
包简介
README 文档
README
- 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:
$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
$token = $auth->requestAccessToken($request); return redirect(url('products'));
Now, any controller that needs Shopify, add the HasShopify trait, then you can do somthing like
$this->shopify()->Product->all()
统计信息
- 总下载量: 36
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2015-11-02