作者 竞泽

alter:修改提供者名称

... ... @@ -24,7 +24,7 @@
"extra": {
"laravel": {
"providers": [
"Lackoxygen\\GzCbec\\GzCBECProvider"
"Lackoxygen\\GzCbec\\GzCBECServiceProvider"
]
}
}
... ...
<?php
namespace Lackoxygen\GzCbec;
use Illuminate\Support\ServiceProvider;
class GzCBECProvider extends ServiceProvider
{
/**
* @var bool
*/
protected $defer = true;
/**
* @var array
*/
protected $commands = [];
/**
* Register any application services.
*
* @return void
*/
public function register()
{
$this->commands($this->commands);
}
public function boot()
{
$this->publishes([__DIR__ . '/../config/gz-cbec.php' => config_path('gz-cbec.php')]);
}
/**
* @return string[]
*/
public function provides()
{
return ['gzCbec', GzCBEC::class];
}
}
<?php
namespace Lackoxygen\GzCbec;
use Illuminate\Support\ServiceProvider;
class GzCBECServiceProvider extends ServiceProvider
{
public function boot()
{
$configPath = __DIR__ . '/../config/gz-cbec.php';
$this->publishes([$configPath => config_path('gz-cbec.php')], 'lackoxygen-gz-cbec');
}
/**
* @inheritDoc
*/
public function provides(): array
{
return ['gzCbec', GzCBEC::class];
}
}
... ...