protected function getForeignResource()
    {
        $modelName = $this->getForeignModelName();
        // Find the resource file from the resource-map or make a standard name.
        $resourceFile = ResourceMapper::pluckFirst($modelName) ?: Helpers::makeJsonFileName($modelName);

        if (File::exists(Config::getResourceFilePath($resourceFile))) {
            return Resource::fromFile($resourceFile, 'crestapps');
        }

        return null;
    }
protected function getForeignResource()
    {
        $modelName = $this->getForeignModelName();
        // Find the resource file from the resource-map or make a standard name.
        $resourceFile = ResourceMapper::pluckFirst($modelName) ?: Helpers::makeJsonFileName($modelName);

        if (File::exists(Config::getResourceFilePath($resourceFile))) {
            return Resource::fromFile($resourceFile, 'crestapps');
        }

        return null;
    }
protected function getForeignResource ( ) { $ modelName = $ this -> getForeignModelName ( ) ; // Find the resource file from the resource-map or make a standard name. $ resourceFile = ResourceMapper :: pluckFirst ( $ modelName ) ? : Helpers :: makeJsonFileName ( $ modelName ) ; if ( File :: exists ( Config :: getResourceFilePath ( $ resourceFile ) ) ) { return Resource :: fromFile ( $ resourceFile , 'crestapps' ) ; } return null ; }
Gets the foreign model fields from resource file

@return CrestApps\CodeGenerator\Models\Resource|null
Gets the foreign model fields from resource file