mirror of
https://github.com/laravel/laravel.git
synced 2025-02-20 11:53:14 +08:00
Add a basic service provider for config overwriting.
This commit is contained in:
parent
c7eecb1c91
commit
c1db7050ea
@ -17,14 +17,14 @@ class AppServiceProvider extends ServiceProvider {
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* This service provider is a great spot to register your various container
|
||||
* bindings with the application. As you can see, we are registering our
|
||||
* "Registrar" implementation here. You can add your own bindings too!
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
// This service provider is a great spot to register your various container
|
||||
// bindings with the application. As you can see, we are registering our
|
||||
// "Registrar" implementation here. You can add your own bindings too!
|
||||
|
||||
$this->app->bind(
|
||||
'Illuminate\Contracts\Auth\Registrar',
|
||||
'App\Services\Registrar'
|
||||
|
23
app/Providers/ConfigServiceProvider.php
Normal file
23
app/Providers/ConfigServiceProvider.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class ConfigServiceProvider extends ServiceProvider {
|
||||
|
||||
/**
|
||||
* Overwrite any vendor / package configuration.
|
||||
*
|
||||
* This service provider is intended to provide a convenient location for you
|
||||
* to overwrite any "vendor" or package configuration that you may want to
|
||||
* modify before the application handles the incoming request / command.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
config([
|
||||
//
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
@ -141,6 +141,7 @@ return [
|
||||
*/
|
||||
'App\Providers\AppServiceProvider',
|
||||
'App\Providers\BusServiceProvider',
|
||||
'App\Providers\ConfigServiceProvider',
|
||||
'App\Providers\EventServiceProvider',
|
||||
'App\Providers\RouteServiceProvider',
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user