/** * @param $app */ protected function persistDb() { // always use the same DB connection if (static::$db) { $this->app->set('db', static::$db); } elseif ($this->app->has('db')) { static::$db = $this->app->get('db'); } }