public function compile($stub, $modelName, $modelData, stdClass $scaffolderConfig, $hash, ScaffolderThemeExtensionInterface $themeExtension, array $extensions, $extra = null)
    {
        if (File::exists(base_path('scaffolder-config/cache/view_index_' . $hash . self::CACHE_EXT)))
        {
            return $this->store($modelName, $scaffolderConfig, '', new FileToCompile(true, $hash));
        }
        else
        {
            $this->stub = $stub;

            $this->replaceClassName($modelName)
                ->replaceBreadcrumb($modelName, $modelData->modelLabel)
                ->addDatatableFields($modelName, $modelData)
                ->setTableHeaders($modelData)
                ->replaceRoutePrefix($scaffolderConfig->routing->prefix);

            $this->stub = $themeExtension->runAfterIndexViewIsCompiled($this->stub, $modelData, $scaffolderConfig);

            foreach ($extensions as $extension)
            {
                $this->stub = $extension->runAfterIndexViewIsCompiled($this->stub, $modelData, $scaffolderConfig);
            }

            return $this->store($modelName, $scaffolderConfig, $this->stub, new FileToCompile(false, $hash));
        }
    }
public function compile($stub, $modelName, $modelData, stdClass $scaffolderConfig, $hash, ScaffolderThemeExtensionInterface $themeExtension, array $extensions, $extra = null)
    {
        if (File::exists(base_path('scaffolder-config/cache/view_index_' . $hash . self::CACHE_EXT)))
        {
            return $this->store($modelName, $scaffolderConfig, '', new FileToCompile(true, $hash));
        }
        else
        {
            $this->stub = $stub;

            $this->replaceClassName($modelName)
                ->replaceBreadcrumb($modelName, $modelData->modelLabel)
                ->addDatatableFields($modelName, $modelData)
                ->setTableHeaders($modelData)
                ->replaceRoutePrefix($scaffolderConfig->routing->prefix);

            $this->stub = $themeExtension->runAfterIndexViewIsCompiled($this->stub, $modelData, $scaffolderConfig);

            foreach ($extensions as $extension)
            {
                $this->stub = $extension->runAfterIndexViewIsCompiled($this->stub, $modelData, $scaffolderConfig);
            }

            return $this->store($modelName, $scaffolderConfig, $this->stub, new FileToCompile(false, $hash));
        }
    }
public function compile ( $ stub , $ modelName , $ modelData , stdClass $ scaffolderConfig , $ hash , ScaffolderThemeExtensionInterface $ themeExtension , array $ extensions , $ extra = null ) { if ( File :: exists ( base_path ( 'scaffolder-config/cache/view_index_' . $ hash . self :: CACHE_EXT ) ) ) { return $ this -> store ( $ modelName , $ scaffolderConfig , '' , new FileToCompile ( true , $ hash ) ) ; } else { $ this -> stub = $ stub ; $ this -> replaceClassName ( $ modelName ) -> replaceBreadcrumb ( $ modelName , $ modelData -> modelLabel ) -> addDatatableFields ( $ modelName , $ modelData ) -> setTableHeaders ( $ modelData ) -> replaceRoutePrefix ( $ scaffolderConfig -> routing -> prefix ) ; $ this -> stub = $ themeExtension -> runAfterIndexViewIsCompiled ( $ this -> stub , $ modelData , $ scaffolderConfig ) ; foreach ( $ extensions as $ extension ) { $ this -> stub = $ extension -> runAfterIndexViewIsCompiled ( $ this -> stub , $ modelData , $ scaffolderConfig ) ; } return $ this -> store ( $ modelName , $ scaffolderConfig , $ this -> stub , new FileToCompile ( false , $ hash ) ) ; } }
Compiles the index view.

@param $stub
@param $modelName
@param $modelData
@param \stdClass $scaffolderConfig
@param $hash
@param \Scaffolder\Support\Contracts\ScaffolderThemeExtensionInterface $themeExtension
@param \Scaffolder\Support\Contracts\ScaffolderExtensionInterface[] $extensions
@param null $extra

@return string
Compiles the index view .