public function getMedia($group = NULL) {
    if (is_null($group)) {
      return $this->media()->orderBy('weight', 'ASC')->get();
    }

    return $this->getMediaByGroup($group);
  }
public function getMedia($group = NULL) {
    if (is_null($group)) {
      return $this->media()->orderBy('weight', 'ASC')->get();
    }

    return $this->getMediaByGroup($group);
  }
public function getMedia ( $ group = NULL ) { if ( is_null ( $ group ) ) { return $ this -> media ( ) -> orderBy ( 'weight' , 'ASC' ) -> get ( ) ; } return $ this -> getMediaByGroup ( $ group ) ; }
Get all the media assigned to the current model instance

@param $group string
The file group to retrieve

@return object
A Illuminate\Database\Eloquent\Collection Object of
Devfactory\Media\Models\Media Objects
Get all the media assigned to the current model instance