protected function getCurrentResource($resourceFile)
    {
        $resource = Resource::fromFile($resourceFile, 'migration');

        if (!$resource->hasFields() && !$resource->hasIndexes()) {
            throw new Exception('You must provide at least one field or index to generate the migration');
        }

        return $resource;
    }
protected function getCurrentResource($resourceFile)
    {
        $resource = Resource::fromFile($resourceFile, 'migration');

        if (!$resource->hasFields() && !$resource->hasIndexes()) {
            throw new Exception('You must provide at least one field or index to generate the migration');
        }

        return $resource;
    }
protected function getCurrentResource ( $ resourceFile ) { $ resource = Resource :: fromFile ( $ resourceFile , 'migration' ) ; if ( ! $ resource -> hasFields ( ) && ! $ resource -> hasIndexes ( ) ) { throw new Exception ( 'You must provide at least one field or index to generate the migration' ) ; } return $ resource ; }
Gets resource using current fields file

@param string $resourceFile

@throws Exception

@return CrestApps\CodeGenerator\Models\Resource
Gets resource using current fields file