Skip to content

Commit 68ade38

Browse files
authored
Update credential-storage.md
Should be `useModelStorage` instead of `useModelStore`
1 parent 5dcfe14 commit 68ade38

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/credential-storage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ For the package to know which model you want to use, you will need to call the f
3131
use Webfox\Xero\Xero;
3232
use App\Models\Settings;
3333

34-
Xero::useModelStore(Settings::first());
34+
Xero::useModelStorage(Settings::first());
3535
```
3636

3737
If you need to resolve a model depending on some application state such as the authenticated user, this should be added to [a custom middleware](https://laravel.com/docs/11.x/middleware#defining-middleware) instead of the app service provider, e.g.
@@ -49,7 +49,7 @@ class ConfigureXeroMiddleware
4949
public function handle(Request $request, Closure $next)
5050
{
5151
if ($request->user()) {
52-
Xero::useModelStore($request->user()->currentTeam);
52+
Xero::useModelStorage($request->user()->currentTeam);
5353
}
5454

5555
return $next($request);
@@ -98,4 +98,4 @@ You will need to implement the following methods:
9898
2. `store(AccessTokenInterface $token, array $tenants = null)` - Creates/Updates the credentials.
9999
3. `data(string $key = null)` - Returns the stored credentials (it is recommended you check the credentials exists, if not throw the `XeroCredentialsNotFound` exception).
100100

101-
Once this has been completed, you should point `xero.credential_store` to your new implementation.
101+
Once this has been completed, you should point `xero.credential_store` to your new implementation.

0 commit comments

Comments
 (0)