AbstractFactory.php
public function getAttributes($key = null)
    {
        if (!($key)) {
            return $this->attributes;
        }

        return $this->attributes->get($key);
    }
public function getAttributes($key = null)
    {
        if (!($key)) {
            return $this->attributes;
        }

        return $this->attributes->get($key);
    }
public function getAttributes ( $ key = null ) { if ( ! ( $ key ) ) { return $ this -> attributes ; } return $ this -> attributes -> get ( $ key ) ; }
Get the attributes.

@param null $key

@return \Illuminate\Support\Collection|mixed
Get the attributes .