public function mediaField($field)
    {
        if(count($this->media)) {
            $results = $this->media->where('field', $field);
            if(count($results)) {
                return $results;
            }
        }

        return null;
    }
public function mediaField($field)
    {
        if(count($this->media)) {
            $results = $this->media->where('field', $field);
            if(count($results)) {
                return $results;
            }
        }

        return null;
    }
public function mediaField ( $ field ) { if ( count ( $ this -> media ) ) { $ results = $ this -> media -> where ( 'field' , $ field ) ; if ( count ( $ results ) ) { return $ results ; } } return null ; }
Get media of a specific field.

@param  $field
@return object|null
Get media of a specific field .