src/SchemaExtender.php
public function tableSeed($tableName, $callback)
    {
        if (! is_array($callback) && ! ($callback instanceof \Closure)) {
            throw InvalidArgumentPassedException::isNotArrayOrClosure();    
        }

        $this->setTableName($tableName);

        // Make sure to flush the old seed query index
        // to avoid collision with the new incoming value.
        $this->flushSeedQueryIndex();

        if ($callback instanceof \Closure) {
            $obj = (object) array();
            $callback = (array) $callback($obj);
        }

        $seeds = array();
        foreach ($callback as $column => $value) {
            $seeds[$column] = $value;
        }

        $this->setSeedQueryIndex($this->totalSeedQueries());
        $this->setSeedQuery('table', $this->getTableNamePrefix($this->getTableName()));
        $this->setSeedQuery('record', $seeds);

        return $this;
    }
public function tableSeed($tableName, $callback)
    {
        if (! is_array($callback) && ! ($callback instanceof \Closure)) {
            throw InvalidArgumentPassedException::isNotArrayOrClosure();    
        }

        $this->setTableName($tableName);

        // Make sure to flush the old seed query index
        // to avoid collision with the new incoming value.
        $this->flushSeedQueryIndex();

        if ($callback instanceof \Closure) {
            $obj = (object) array();
            $callback = (array) $callback($obj);
        }

        $seeds = array();
        foreach ($callback as $column => $value) {
            $seeds[$column] = $value;
        }

        $this->setSeedQueryIndex($this->totalSeedQueries());
        $this->setSeedQuery('table', $this->getTableNamePrefix($this->getTableName()));
        $this->setSeedQuery('record', $seeds);

        return $this;
    }
public function tableSeed ( $ tableName , $ callback ) { if ( ! is_array ( $ callback ) && ! ( $ callback instanceof \ Closure ) ) { throw InvalidArgumentPassedException :: isNotArrayOrClosure ( ) ; } $ this -> setTableName ( $ tableName ) ; // Make sure to flush the old seed query index // to avoid collision with the new incoming value. $ this -> flushSeedQueryIndex ( ) ; if ( $ callback instanceof \ Closure ) { $ obj = ( object ) array ( ) ; $ callback = ( array ) $ callback ( $ obj ) ; } $ seeds = array ( ) ; foreach ( $ callback as $ column => $ value ) { $ seeds [ $ column ] = $ value ; } $ this -> setSeedQueryIndex ( $ this -> totalSeedQueries ( ) ) ; $ this -> setSeedQuery ( 'table' , $ this -> getTableNamePrefix ( $ this -> getTableName ( ) ) ) ; $ this -> setSeedQuery ( 'record' , $ seeds ) ; return $ this ; }
The composer for seeding the given table name.

@param  string          $tableName
@param  array|\Closure  $callback

@throws LordDashMe\Wordpress\DB\Exception\InvalidArgumentPassed

@return $this
The composer for seeding the given table name .