-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathApiPostcodeServiceProvider.php
More file actions
41 lines (39 loc) · 967 Bytes
/
ApiPostcodeServiceProvider.php
File metadata and controls
41 lines (39 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/*
* (c) Api Postcode <info@api-postcode.nl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ApiPostcode;
use Illuminate\Support\ServiceProvider as AppServiceProvider;
use ApiPostcode\Client\PostcodeClient;
/**
* Class ApiPostcodeServiceProvider
*/
class ApiPostcodeServiceProvider extends AppServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = false;
/**
* {@inheritdoc}
*/
public function register()
{
// Postcode Client
$this->app->singleton('api.postcode', function () {
return new PostcodeClient(config('api-postcode.token'));
});
}
/**
* {@inheritdoc}
*/
public function boot()
{
$this->publishes([__DIR__ . '/config/api-postcode.php' => config_path('api-postcode.php')]);
}
}