/** * Execute the console command. * * @return void */ public function fire() { if (!$this->confirmToProceed()) { return; } $this->resolver->setDefaultConnection($this->getDatabase()); $this->getSeeder()->run(); }
/** * Set the default connection name. * * @param string $name * @return void */ public function setConnection($name) { if (!is_null($name)) { $this->resolver->setDefaultConnection($name); } $this->repository->setSource($name); $this->connection = $name; }
/** * Resolve a connection instance. * * @param string $connection * @return \Nova\Database\Connection */ public static function resolveConnection($connection = null) { return static::$resolver->connection($connection); }
/** * Resolve the database connection instance. * * @return \Nova\Database\Connection */ public function getConnection() { return $this->resolver->connection($this->connection); }