You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,10 +34,14 @@ If you're using Laravel 5.4 or less, add the `BOAIdeas\Shopify\ShopifyServicePro
34
34
## Configuration
35
35
36
36
Now, by default, the package will look for the following values in your .env file:
37
+
```
38
+
// .env
39
+
37
40
SHOPIFY_KEY=YourAppApiKey
38
41
SHOPIFY_SECRET=YourAppSecret
39
42
SHOPIFY_DOMAIN=YourShopDomain (for private apps)
40
43
SHOPIFY_TOKEN=YourToken
44
+
```
41
45
42
46
If, for some reason, you want to change any of these settings, you can publish the config file with:
43
47
@@ -60,7 +64,7 @@ return [
60
64
61
65
## Usage
62
66
63
-
Once installed, you can use the service by either inject it to your methods or as a real time facade. For more information about how to use the service, look at [https://github.com/joshrps/laravel-shopify-API-wrapper].
67
+
Once installed, you can use the service by either inject it to your methods or as a real time facade. For more information about how to use the service, look at https://github.com/joshrps/laravel-shopify-API-wrapper.
64
68
65
69
### Dependency Injection
66
70
Now you can simply type hint the service in your method's arguments. For better readabilty, we prefer to import the full class name with a `use` statement, and aliasing it to Shopify while we're at it.
@@ -69,14 +73,17 @@ Now you can simply type hint the service in your method's arguments. For better
69
73
use RocketCode\Shopify\API as Shopify;
70
74
71
75
Route::get('/', function (Shopify $shopify) {
72
-
$call = $shopify->call([
76
+
77
+
$call = $shopify->call(
78
+
[
73
79
'URL' => 'products.json',
74
80
'METHOD' => 'GET',
75
81
'DATA' => [
76
82
'limit' => 5,
77
83
'published_status' => 'any'
78
84
]
79
85
]);
86
+
80
87
});
81
88
```
82
89
@@ -87,14 +94,17 @@ Now you can use Laravel's [on the fly facades](https://twitter.com/taylorotwell/
0 commit comments