public static function getCustomTemplate($baseTemplateName, $postType)
    {
        //fix post type name
        if(strstr($postType, '_')) {
            $explodePostTypeName = explode('_', $postType);
            $postType = $explodePostTypeName[1];
        }

        $postTypeFileName = $baseTemplateName.ucfirst($postType).".vue";
        if(file_exists($_SERVER['DOCUMENT_ROOT'].'/../resources/assets/js/components/posts/'.$postTypeFileName)) {
            return $baseTemplateName.ucfirst($postType);
        }
        return $baseTemplateName;
    }
public static function getCustomTemplate($baseTemplateName, $postType)
    {
        //fix post type name
        if(strstr($postType, '_')) {
            $explodePostTypeName = explode('_', $postType);
            $postType = $explodePostTypeName[1];
        }

        $postTypeFileName = $baseTemplateName.ucfirst($postType).".vue";
        if(file_exists($_SERVER['DOCUMENT_ROOT'].'/../resources/assets/js/components/posts/'.$postTypeFileName)) {
            return $baseTemplateName.ucfirst($postType);
        }
        return $baseTemplateName;
    }
public static function getCustomTemplate ( $ baseTemplateName , $ postType ) { //fix post type name if ( strstr ( $ postType , '_' ) ) { $ explodePostTypeName = explode ( '_' , $ postType ) ; $ postType = $ explodePostTypeName [ 1 ] ; } $ postTypeFileName = $ baseTemplateName . ucfirst ( $ postType ) . ".vue" ; if ( file_exists ( $ _SERVER [ 'DOCUMENT_ROOT' ] . '/../resources/assets/js/components/posts/' . $ postTypeFileName ) ) { return $ baseTemplateName . ucfirst ( $ postType ) ; } return $ baseTemplateName ; }
Get a custom vuejs template for a particular default function.

@param string $baseTemplateName The base name of Custom template (ex. 'Create' or 'Update')
@param string $postType         The slug of Post Type (ex. post_service)

@return string Returns full view js custom design name if a file with that name is found (ex. CreateArticle.vue)
Get a custom vuejs template for a particular default function .