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

Commit b561d37

Browse files
committed
Fix bind json-api to facade (app container)
1 parent 0cbaf63 commit b561d37

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/JsonApiServiceProvider.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Illuminate\Support\ServiceProvider;
88
use Illuminate\Testing\TestResponse;
99
use SkoreLabs\JsonApi\Builder as JsonApiBuilder;
10+
use SkoreLabs\JsonApi\Support\JsonApi;
1011
use SkoreLabs\JsonApi\Testing\TestResponseMacros;
1112

1213
class JsonApiServiceProvider extends ServiceProvider
@@ -36,6 +37,10 @@ public function register()
3637

3738
$this->mergeConfigFrom(__DIR__.'/../config/json-api.php', 'json-api');
3839

40+
$this->app->singleton('json-api', function () {
41+
return new JsonApi();
42+
});
43+
3944
$this->registerTestingMacros();
4045
}
4146

0 commit comments

Comments
 (0)