Closed arslan308 closed 4 years ago
You need to use Auth::user->api()
@Kyon147 does this work or i have to ise osiset basic-shopify-api
If you are using v11.* of package, you need to use Auth::user()->api()
, read more about it here:
https://github.com/osiset/laravel-shopify/wiki/Usage
I am using 11.* let me try your method, will let you know soon @awebartisan
@awebartisan i am new to shopify app, can you please guide me, i am using this package osiset/laravel-shopify and also this osiset/basic-shopify-api, which one is best and proffessionaly used
BasicShopifyAPI package is a base package, its only purpose is to make Shopify API calls. Whereas, this is Laravel package, built on top of that BasicShopifyAPI package. They are meant to be used together and not separately.
@awebartisan Is correct.
/** @var \Osiset\ShopifyApp\Contracts\ShopModel $shop */
$shop = Auth::user();
$shop->api()->rest('GET', '/admin/products.json');
No need to pass version in the URL, use SHOPIFY_API_VERSION env for that... default its set to 2020-01.
solved
i am using these too use Osiset\ShopifyApp\Facades\ShopifyApp; use Osiset\ShopifyApp\Models\Shop;
error is 'Osiset\ShopifyApp\Facades\ShopifyApp' not found