public static function getFields($post_type)
    {
        $postType = PostType::all()->where('slug', $post_type)->first();

        if($postType) {
            return $postType->fields;
        }
        
        return [];
    }
public static function getFields($post_type)
    {
        $postType = PostType::all()->where('slug', $post_type)->first();

        if($postType) {
            return $postType->fields;
        }
        
        return [];
    }
public static function getFields ( $ post_type ) { $ postType = PostType :: all ( ) -> where ( 'slug' , $ post_type ) -> first ( ) ; if ( $ postType ) { return $ postType -> fields ; } return [ ] ; }
Get fields of a post type.

@param  string $post_type
@return array
@throws \Exception
Get fields of a post type .