Skip to content

Commit b6b5624

Browse files
authored
Update README.md
1 parent 9837d25 commit b6b5624

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,26 @@ composer require fredbradley/php-steer-api
2121

2222
## Usage
2323
### If within a Laravel Application with Laravel Discovery turned on
24-
The package will automatically register the `SteerConnector` class as a singleton. You can then use the `SteerConnector` class as a dependency in your classes.
2524
You will need to add the following to your `.env` file:
2625
```dotenv
2726
STEER_API_KEY=
2827
STEER_SUBSCRIPTION_KEY=
2928
STEER_BASE_URL=
3029
```
3130
The config file is publishable, but you shouldn't need to change anything.
31+
#### Dependency Injection
32+
The package will automatically register the `SteerConnector` class as a singleton. You can then use the `SteerConnector` class as a dependency in your classes.
33+
#### Facade
34+
There is a facade that goes with the package if that's how you choose to work. Example:
35+
```php
36+
use FredBradley\PhpSteerApi\Facades\Steer;
37+
use FredBradley\PhpSteerApi\QueryBuilder;
38+
39+
// Set the Query Builder
40+
$query = (new QueryBuilder())->setYear(2022);
41+
// Get the Data
42+
$data = Steer::getAssessmentData($query)->object();
43+
```
3244

3345
### If using as a standalone package in any PHP application
3446
```php

0 commit comments

Comments
 (0)