File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Dystcz \LunarApiNewsletter ;
4
4
5
+ use Dystcz \LunarApi \Domain \JsonApi \Extensions \Facades \SchemaManifest ;
6
+ use Dystcz \LunarApiNewsletter \Domain \Newsletter \JsonApi \V1 \NewsletterSchema ;
5
7
use Illuminate \Support \ServiceProvider ;
6
8
7
9
class LunarApiNewsletterServiceProvider extends ServiceProvider
8
10
{
9
11
/**
10
12
* Bootstrap the application services.
11
13
*/
12
- public function boot ()
14
+ public function boot (): void
13
15
{
14
16
$ this ->loadRoutesFrom (__DIR__ .'/../routes/api.php ' );
15
17
@@ -18,12 +20,14 @@ public function boot()
18
20
__DIR__ .'/../config/lunar-api-newsletter.php ' => config_path ('lunar-api-newsletter.php ' ),
19
21
], 'config ' );
20
22
}
23
+
24
+ SchemaManifest::registerSchema (NewsletterSchema::class);
21
25
}
22
26
23
27
/**
24
28
* Register the application services.
25
29
*/
26
- public function register ()
30
+ public function register (): void
27
31
{
28
32
// Automatically apply the package configuration
29
33
$ this ->mergeConfigFrom (__DIR__ .'/../config/lunar-api-newsletter.php ' , 'lunar-api-newsletter ' );
Original file line number Diff line number Diff line change 2
2
3
3
namespace Dystcz \LunarApiNewsletter \Tests ;
4
4
5
- use Dystcz \LunarApiNewsletter \Tests \Stubs \JsonApi \Server ;
5
+ use Dystcz \LunarApi \Domain \JsonApi \Extensions \Facades \SchemaManifest ;
6
+ use Dystcz \LunarApiNewsletter \Domain \Newsletter \JsonApi \V1 \NewsletterSchema ;
6
7
use Illuminate \Contracts \Debug \ExceptionHandler ;
7
8
use Illuminate \Foundation \Application ;
8
9
use Illuminate \Support \Facades \Config ;
@@ -24,11 +25,6 @@ protected function setUp(): void
24
25
*/
25
26
protected function getPackageProviders ($ app ): array
26
27
{
27
- Config::set (
28
- 'lunar-api.additional_servers ' ,
29
- [Server::class],
30
- );
31
-
32
28
return [
33
29
// Laravel JsonApi
34
30
\LaravelJsonApi \Encoder \Neomerx \ServiceProvider::class,
@@ -58,6 +54,8 @@ public function getEnvironmentSetUp($app): void
58
54
{
59
55
Config::set ('newsletter.driver ' , \Spatie \Newsletter \Drivers \MailChimpDriver::class);
60
56
Config::set ('newsletter.driver_arguments.endpoint ' , '' );
57
+
58
+ SchemaManifest::registerSchema (NewsletterSchema::class);
61
59
}
62
60
63
61
protected function resolveApplicationExceptionHandler ($ app ): void
You can’t perform that action at this time.
0 commit comments