Set the connection resolver instance.
public static setConnectionResolver ( Illuminate\Database\ConnectionResolverInterface $resolver ) : void | ||
$resolver | Illuminate\Database\ConnectionResolverInterface | resolver |
return | void |
/** * Bootstrap the application events. * * @return void */ public function boot() { if ($this->app['config']->get('app.debug') === true) { \DB::listen(function ($query, $bindings, $time) { $logFile = storage_path('logs/query.log'); $monoLog = new Logger('log'); $monoLog->pushHandler(new StreamHandler($logFile, Logger::INFO)); $monoLog->info($query, compact('bindings', 'time')); }); } DynamicModel::setKeyGen(app('xe.keygen')); DynamicModel::setConnectionResolver($this->app['xe.db']); DynamicModel::setEventDispatcher($this->app['events']); }
/** * Bootstrap the application events. * * @return void */ public function boot() { DynamicModel::setConnectionResolver($this->app['xe.db']); DynamicModel::setEventDispatcher($this->app['events']); }