File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /*
3+ * (c) Api Postcode <info@api-postcode.nl>
4+ *
5+ * For the full copyright and license information, please view the LICENSE
6+ * file that was distributed with this source code.
7+ */
8+ namespace ApiPostcode ;
9+
10+ use Illuminate \Support \ServiceProvider as AppServiceProvider ;
11+ use ApiPostcode \Client \PostcodeClient ;
12+
13+ /**
14+ * Class ApiPostcodeServiceProvider
15+ */
16+ class ApiPostcodeServiceProvider extends AppServiceProvider
17+ {
18+ /**
19+ * Indicates if loading of the provider is deferred.
20+ *
21+ * @var bool
22+ */
23+ protected $ defer = false ;
24+ /**
25+ * {@inheritdoc}
26+ */
27+ public function register ()
28+ {
29+ // Postcode Client
30+ $ this ->app ->singleton ('api.postcode ' , function () {
31+ return new PostcodeClient (config ('api-postcode.token ' ));
32+ });
33+ }
34+ /**
35+ * {@inheritdoc}
36+ */
37+ public function boot ()
38+ {
39+ $ this ->publishes ([__DIR__ . '/config/api-postcode.php ' => config_path ('api-postcode.php ' )]);
40+ }
41+ }
You can’t perform that action at this time.
0 commit comments