Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit b264cd7

Browse files
committed
docs: add manual configuration options
1 parent a314299 commit b264cd7

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313

1414
# Laravel - Magento API
1515

16-
A Magento 2 API Object Oriented wrapper for a Laravel application. Also includes an optional opinionated storage system for
17-
consuming Magento 2 data in your Laravel application.
16+
A Magento 2 API Object Oriented wrapper for a Laravel application. This package also includes an optional opinionated storage system for consuming Magento 2 data in your Laravel application.
1817

1918
## Installation
2019

@@ -35,6 +34,8 @@ If you are wanting to store the data from the Magento API and want to use our op
3534
php artisan vendor:publish --provider="Grayloon\Magento\MagentoServiceProvider" --tag="migrations"
3635
```
3736

37+
> more configuration options are available in the [Manual Configuration Options](#manual-configuration-options) section.
38+
3839
Configure your Magento 2 API endpoint and token in your `.env` file:
3940
```
4041
MAGENTO_BASE_URL="https://mydomain.com"
@@ -111,6 +112,31 @@ Get a schema blueprint of the Magento 2 REST API:
111112
$magento->api('schema')->show();
112113
```
113114

115+
## Manual Configuration Options
116+
117+
This package features additional configuration options which uses the Magento 2 default settings. You are more than welcome to change any of the values as you need fit in your application:
118+
119+
### Base API Path
120+
121+
The Magento 2 REST API Base Path. By default, this is assigned as 'rest'. Developers should only update this setting if the path has changed:
122+
```
123+
MAGENTO_BASE_PATH='rest'
124+
```
125+
126+
### Magento Store Code
127+
128+
The Magento 2 REST API Store Code By default, this is assigned to 'all' specifying all magento stores on requests. Developers may update this to specify the API around a specific store code.
129+
```
130+
MAGENTO_STORE_CODE='all'
131+
```
132+
133+
### Magento API Version
134+
135+
The Magento 2 REST API Version. By default, Magento 2 sets this to 'V1'. Developers should only update this setting if the version has changed.
136+
```
137+
MAGENTO_API_VERSION='V1'
138+
```
139+
114140
## Jobs
115141

116142
> In order use these queue jobs, you must have registered the migrations from the installation section noted above.

config/magento.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
| The Magento 2 REST API Store Code By default, this
4646
| is assigned to 'all' specifying all magento stores
4747
| on requests. Developers may update this to specify
48-
| the API around a specific code.
48+
| the API around a specific store code.
4949
|
5050
*/
5151
'store_code' => env('MAGENTO_STORE_CODE', 'all'),
@@ -56,7 +56,7 @@
5656
|--------------------------------------------------------------------------
5757
|
5858
| The Magento 2 REST API Version. By default, Magento 2
59-
| sets this to 'v1'. Developers should only update this
59+
| sets this to 'V1'. Developers should only update this
6060
| setting if the version has changed.
6161
|
6262
*/

0 commit comments

Comments
 (0)