Skip to content

Commit bdb532b

Browse files
author
wanghaojie
committed
fix: 解决冲突
1 parent 2c2d01d commit bdb532b

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
"providers": [
4949
"Mckue\\Excel\\ExcelServiceProvider"
5050
]
51+
},
52+
"aliases": {
53+
"MckueExcel": "Mckue\\Excel\\Facades\\Excel"
5154
}
5255
}
5356
}

src/ExcelServiceProvider.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function boot(): void
2525
{
2626
if ($this->app->runningInConsole()) {
2727
if ($this->app instanceof LumenApplication) {
28-
$this->app->configure('excel');
28+
$this->app->configure('mckue-excel');
2929
} else {
3030
$this->publishes([
3131
$this->getConfigFile() => config_path('mckue-excel.php'),
@@ -63,17 +63,17 @@ public function register(): void
6363
return new Filesystem($app->make('filesystem'));
6464
});
6565

66-
$this->app->bind('excel', function ($app) {
66+
$this->app->bind('mckue.excel', function ($app) {
6767
return new Excel(
6868
$app->make(Writer::class),
6969
$app->make(Reader::class),
7070
$app->make(Filesystem::class)
7171
);
7272
});
7373

74-
$this->app->alias('excel', Excel::class);
75-
$this->app->alias('excel', Exporter::class);
76-
$this->app->alias('excel', Importer::class);
74+
$this->app->alias('mckue.excel', Excel::class);
75+
$this->app->alias('mckue.excel', Exporter::class);
76+
$this->app->alias('mckue.excel', Importer::class);
7777

7878
Collection::mixin(new DownloadCollection);
7979
Collection::mixin(new StoreCollection);

src/Facades/Excel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ class Excel extends Facade
2626
*/
2727
protected static function getFacadeAccessor(): string
2828
{
29-
return 'excel';
29+
return 'mckue.excel';
3030
}
3131
}

0 commit comments

Comments
 (0)