Skip to content

Commit 983a96e

Browse files
Providers, Extras
1 parent e19dd5e commit 983a96e

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

composer.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,17 @@
4242
"php artisan vendor:publish --provider=Vendor\\Canducci\\ZipCode\\Providers\\ZipCodeServiceProvider",
4343
"php artisan vendor:publish --provider=Vendor\\Canducci\\ZipCode\\Providers\\ZipCodeAddressServiceProvider"
4444
]
45+
},
46+
"extra": {
47+
"laravel": {
48+
"providers": [
49+
"Canducci\\ZipCode\\Providers\\ZipCodeServiceProvider",
50+
"Canducci\\ZipCode\\Providers\\ZipCodeAddressServiceProvider"
51+
],
52+
"aliases": {
53+
"ZipCode": "Canducci\\ZipCode\\Facades\\ZipCode",
54+
"Address": "Canducci\\ZipCode\\Facades\\ZipCodeAddress"
55+
}
56+
}
4557
}
4658
}

src/Canducci/ZipCode/Providers/ZipCodeServiceProvider.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ class ZipCodeServiceProvider extends ServiceProvider
1010
public function boot()
1111
{
1212
$this->publishes([
13-
__DIR__ . '../config/simplecache.php' => config_path('simplecache.php'),
14-
]);
13+
__DIR__ . '/../config/simplecache.php' => config_path('simplecache.php'),
14+
], 'simplecache');
1515
}
1616
public function register()
1717
{
18-
if (isset($this->app[PhpExtended\SimpleCache\SimpleCacheFilesystem::class]) === false) {
18+
if (isset($this->app['PhpExtended\SimpleCache\SimpleCacheFilesystem']) === false) {
1919
$this->app->singleton(
20-
\PhpExtended\SimpleCache\SimpleCacheFilesystem::class,
21-
new \PhpExtended\SimpleCache\SimpleCacheFilesystem(config('simplecache.path') ?? __DIR__)
20+
'PhpExtended\SimpleCache\SimpleCacheFilesystem',
21+
function ($app) {
22+
return new \PhpExtended\SimpleCache\SimpleCacheFilesystem(config('simplecache.path') ?? __DIR__);
23+
}
2224
);
2325
}
2426
if (isset($this->app[\Canducci\ZipCode\Contracts\ZipCodeRequestContract::class]) === false) {
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
return [
2-
'path' => storage_path('framework/cache')
3-
];
1+
<?php
2+
return [
3+
'path' => storage_path('framework/cache')
4+
];

0 commit comments

Comments
 (0)