for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace NukaCode\Users\Providers;
use Config;
use Illuminate\Support\ServiceProvider;
class UsersServiceProvider extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = false;
* Register bindings in the container.
* @return void
public function register()
$this->mergeConfigFrom(__DIR__ . '/../../../config/config.php', 'users');
}
* Register the service provider.
public function boot()
$this->loadConfigs();
$this->loadMigrations();
$this->loadViews();
* Load the configs.
protected function loadConfigs()
$this->publishes([
__DIR__ . '/../../../config/config.php' => config_path('users.php'),
]);
* Load the migrations.
protected function loadMigrations()
$this->loadMigrationsFrom(__DIR__ . '/../../../database/migrations');
if ($this->app['config']->get('users.enable_social')) {
$this->loadMigrationsFrom(__DIR__ . '/../../../database/social_migrations');
* Register views
protected function loadViews()
if ($this->app['config']->get('users.load_views')) {
$this->app['view']->addLocation(__DIR__ . '/../../../views');