Repository URL to install this package:
|
Version:
1.0.0 ▾
|
<?php
namespace Modules\Core\Providers;
use Illuminate\Support\ServiceProvider;
use Modules\Core\Services\Localization;
class LocalizationServiceProvider extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = false;
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
$this->publishes([
__DIR__ . '/../Config/localization.php' => config_path('localization.php'),
], 'config');
}
/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
return ['modules.handler', 'modules'];
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$packageConfigFile = __DIR__ . '/../Config/localization.php';
$this->mergeConfigFrom(
$packageConfigFile,
'localization'
);
$this->app['localization'] = $this->app->share(
function () {
return new Localization();
}
);
}
}