芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/edurocha/vendor/illuminate/database/DatabaseServiceProvider.php
app['db']); Model::setEventDispatcher($this->app['events']); } /** * Register the service provider. * * @return void */ public function register() { Model::clearBootedModels(); $this->registerEloquentFactory(); $this->registerQueueableEntityResolver(); // The connection factory is used to create the actual connection instances on // the database. We will inject the factory into the manager so that it may // make the connections while they are actually needed and not of before. $this->app->singleton('db.factory', function ($app) { return new ConnectionFactory($app); }); // The database manager is used to resolve various connections, since multiple // connections might be managed. It also implements the connection resolver // interface which may be used by other components requiring connections. $this->app->singleton('db', function ($app) { return new DatabaseManager($app, $app['db.factory']); }); $this->app->bind('db.connection', function ($app) { return $app['db']->connection(); }); } /** * Register the Eloquent factory instance in the container. * * @return void */ protected function registerEloquentFactory() { $this->app->singleton(FakerGenerator::class, function () { return FakerFactory::create(); }); $this->app->singleton(EloquentFactory::class, function ($app) { $faker = $app->make(FakerGenerator::class); return EloquentFactory::construct($faker, database_path('factories')); }); } /** * Register the queueable entity resolver implementation. * * @return void */ protected function registerQueueableEntityResolver() { $this->app->singleton('Illuminate\Contracts\Queue\EntityResolver', function () { return new QueueEntityResolver; }); } }