@@ 17-31 (lines=15) @@ | ||
14 | ||
15 | $this->app->when(ApnChannel::class) |
|
16 | ->needs(Message::class) |
|
17 | ->give(function ($app) use ($credentials) { |
|
18 | $client = new Message; |
|
19 | ||
20 | try { |
|
21 | $client->open( |
|
22 | $credentials->environment(), |
|
23 | $credentials->certificate(), |
|
24 | $credentials->passPhrase() |
|
25 | ); |
|
26 | } catch (Exception $exception) { |
|
27 | throw ConnectionFailed::create($exception); |
|
28 | } |
|
29 | ||
30 | return $client; |
|
31 | }); |
|
32 | ||
33 | $this->app->when(FeedbackService::class) |
|
34 | ->needs(Feedback::class) |
|
@@ 35-49 (lines=15) @@ | ||
32 | ||
33 | $this->app->when(FeedbackService::class) |
|
34 | ->needs(Feedback::class) |
|
35 | ->give(function ($app) use ($credentials) { |
|
36 | $client = new Feedback; |
|
37 | ||
38 | try { |
|
39 | $client->open( |
|
40 | $credentials->environment(), |
|
41 | $credentials->certificate(), |
|
42 | $credentials->passPhrase() |
|
43 | ); |
|
44 | } catch (Exception $exception) { |
|
45 | throw ConnectionFailed::create($exception); |
|
46 | } |
|
47 | ||
48 | return $client; |
|
49 | }); |
|
50 | } |
|
51 | } |
|
52 |