public function getChangeAttribute()
    {
        if ($this->before > $this->after) {
            return sprintf('- %s', $this->before - $this->after);
        } elseif ($this->after > $this->before) {
            return sprintf('+ %s', $this->after - $this->before);
        } else {
            return 'None';
        }
    }
public function getChangeAttribute()
    {
        if ($this->before > $this->after) {
            return sprintf('- %s', $this->before - $this->after);
        } elseif ($this->after > $this->before) {
            return sprintf('+ %s', $this->after - $this->before);
        } else {
            return 'None';
        }
    }
public function getChangeAttribute ( ) { if ( $ this -> before > $ this -> after ) { return sprintf ( '- %s' , $ this -> before - $ this -> after ) ; } elseif ( $ this -> after > $ this -> before ) { return sprintf ( '+ %s' , $ this -> after - $ this -> before ) ; } else { return 'None' ; } }
Returns the change of a stock.

For example: '+ 25' or '- 25'

@return string
Returns the change of a stock .