Skip to content

Commit 889e0bf

Browse files
committed
readme additions
1 parent f7ef8b1 commit 889e0bf

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,14 @@ If you're using Laravel 5.4 or less, add the `BOAIdeas\Shopify\ShopifyServicePro
3434
## Configuration
3535

3636
Now, by default, the package will look for the following values in your .env file:
37+
```
38+
// .env
39+
3740
SHOPIFY_KEY=YourAppApiKey
3841
SHOPIFY_SECRET=YourAppSecret
3942
SHOPIFY_DOMAIN=YourShopDomain (for private apps)
4043
SHOPIFY_TOKEN=YourToken
44+
```
4145

4246
If, for some reason, you want to change any of these settings, you can publish the config file with:
4347

@@ -60,7 +64,7 @@ return [
6064

6165
## Usage
6266

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.
6468

6569
### Dependency Injection
6670
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
6973
use RocketCode\Shopify\API as Shopify;
7074

7175
Route::get('/', function (Shopify $shopify) {
72-
$call = $shopify->call([
76+
77+
$call = $shopify->call(
78+
[
7379
'URL' => 'products.json',
7480
'METHOD' => 'GET',
7581
'DATA' => [
7682
'limit' => 5,
7783
'published_status' => 'any'
7884
]
7985
]);
86+
8087
});
8188
```
8289

@@ -87,14 +94,17 @@ Now you can use Laravel's [on the fly facades](https://twitter.com/taylorotwell/
8794
use Facades\RocketCode\Shopify\API as ShopifyAPI;
8895

8996
Route::get('/', function () {
90-
$call = ShopifyAPI::call([
97+
98+
$call = ShopifyAPI::call(
99+
[
91100
'URL' => 'products.json',
92101
'METHOD' => 'GET',
93102
'DATA' => [
94103
'limit' => 5,
95104
'published_status' => 'any'
96105
]
97106
]);
107+
98108
});
99109
```
100110

0 commit comments

Comments
 (0)