Ejemplo n.º 1
0
 /**
  * @param string $name
  * @return void
  */
 public function setConnection($name)
 {
     if (!is_null($name)) {
         $this->resolver->setDefaultConnection($name);
     }
     $this->repository->setSource($name);
     $this->connection = $name;
 }
Ejemplo n.º 2
0
 /**
  * @param string|null $connection
  * @return \Notadd\Foundation\Database\Connection
  */
 public static function resolveConnection($connection = null)
 {
     return static::$resolver->connection($connection);
 }
 /**
  * @return \Notadd\Foundation\Database\Connection
  */
 public function getConnection()
 {
     return $this->resolver->connection($this->connection);
 }
 /**
  * @param  string $table
  * @return \Notadd\Foundation\Database\Query\Builder
  */
 protected function table($table)
 {
     return $this->db->connection($this->connection)->table($table);
 }
Ejemplo n.º 5
0
 /**
  * @return void
  */
 public function fire()
 {
     $this->resolver->setDefaultConnection($this->getDatabase());
     $this->getSeeder()->run();
 }