Пример #1
0
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     if (!$this->confirmToProceed()) {
         return;
     }
     $this->resolver->setDefaultConnection($this->getDatabase());
     $this->getSeeder()->run();
 }
Пример #2
0
 /**
  * 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;
 }
Пример #3
0
 /**
  * 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);
 }