public function with($table)
    {
        Validate::relation($this->tables['local'], $table);
        $this->setTable('foreign', $table);
        $this->setRelationType(Config::table($this->tables['local'])->relations($this->tables['foreign'])->type);
        $this->setKey('local', Config::table($this->tables['local'])->relations($this->tables['foreign'])->keys->local);
        $this->setKey('foreign', Config::table($this->tables['local'])->relations($this->tables['foreign'])->keys->foreign);

        return $this;
    }
public function with($table)
    {
        Validate::relation($this->tables['local'], $table);
        $this->setTable('foreign', $table);
        $this->setRelationType(Config::table($this->tables['local'])->relations($this->tables['foreign'])->type);
        $this->setKey('local', Config::table($this->tables['local'])->relations($this->tables['foreign'])->keys->local);
        $this->setKey('foreign', Config::table($this->tables['local'])->relations($this->tables['foreign'])->keys->foreign);

        return $this;
    }
public function with ( $ table ) { Validate :: relation ( $ this -> tables [ 'local' ] , $ table ) ; $ this -> setTable ( 'foreign' , $ table ) ; $ this -> setRelationType ( Config :: table ( $ this -> tables [ 'local' ] ) -> relations ( $ this -> tables [ 'foreign' ] ) -> type ) ; $ this -> setKey ( 'local' , Config :: table ( $ this -> tables [ 'local' ] ) -> relations ( $ this -> tables [ 'foreign' ] ) -> keys -> local ) ; $ this -> setKey ( 'foreign' , Config :: table ( $ this -> tables [ 'local' ] ) -> relations ( $ this -> tables [ 'foreign' ] ) -> keys -> foreign ) ; return $ this ; }
Use relation to table
@param string $table Table name
@return self
Use relation to table