public function makeSelect(array $columns = null)
    {
        $columns = $columns ?: $this->columns();
        $selects = [];

        foreach ($columns as $key => $select) {
            if (is_int($key)) {
                $selects[] = $select;
            } else {
                $selects[] = DB::raw($select.' as '.$key);
            }
        }

        return $selects;
    }
public function makeSelect(array $columns = null)
    {
        $columns = $columns ?: $this->columns();
        $selects = [];

        foreach ($columns as $key => $select) {
            if (is_int($key)) {
                $selects[] = $select;
            } else {
                $selects[] = DB::raw($select.' as '.$key);
            }
        }

        return $selects;
    }
public function makeSelect ( array $ columns = null ) { $ columns = $ columns ? : $ this -> columns ( ) ; $ selects = [ ] ; foreach ( $ columns as $ key => $ select ) { if ( is_int ( $ key ) ) { $ selects [ ] = $ select ; } else { $ selects [ ] = DB :: raw ( $ select . ' as ' . $ key ) ; } } return $ selects ; }
Create an array of select parameters from the columns declaration,
transforming string indexed element to have an alias "as".

@param  array|null $columns
@return array
Create an array of select parameters from the columns declaration transforming string indexed element to have an alias as .