Define files published by this package.

@return void
345187
protected function setPublishables()
    {
        $this->publishes([
            "{$this->baseDir()}config/api.php" => config_path('forum.api.php'),
            "{$this->baseDir()}config/integration.php" => config_path('forum.integration.php'),
            "{$this->baseDir()}config/preferences.php" => config_path('forum.preferences.php'),
            "{$this->baseDir()}config/routing.php" => config_path('forum.routing.php'),
            "{$this->baseDir()}config/validation.php" => config_path('forum.validation.php')
        ], 'config');

        $this->publishes([
            "{$this->baseDir()}migrations/" => base_path('database/migrations')
        ], 'migrations');

        $this->publishes([
            "{$this->baseDir()}translations/" => base_path('resources/lang/vendor/forum'),
        ], 'translations');
    }
463421
public function disPresentationFiles()
    {
        $properties     = $this->getProperties();
        $acceptedFiles  = $properties['acceptedFiles'];
        $pptsExt        = $this->getPresentationExtensionConstant();
        $acceptedFiles  = $this->rmAcceptedFiles($acceptedFiles, $pptsExt);
        $properties['acceptedFiles']    = $acceptedFiles;
        $this->setProperties($properties);
        return $this;
    }
638175
protected function publishConfig()
    {
        $this->publishes([
            realpath(__DIR__ . '/./config/api.php') => base_path('config/api.php'),
        ]);

        $this->mergeConfigFrom(
            realpath(__DIR__ . '/./config/api.php'),
            'api'
        );
    }
1036107
protected function publishConfig()
    {
        // Publish config files
        $this->publishes([
            __DIR__.'/../../config/config.php'           => config_path('vat_calculator.php'),
            __DIR__.'/../../public/js/vat_calculator.js' => public_path('js/vat_calculator.js'),
        ]);

        $this->publishes([
            __DIR__.'/../../public/js/vat_calculator.js' => base_path('resources/assets/js/vat_calculator.js'),
        ], 'vatcalculator-spark');
    }
1221141
public function registerDirectories()
    {
        // Publish config files
        $this->publishes([
             __DIR__.'/../config' => config_path('decoy')
        ], 'config');

        // Publish decoy css and js to public directory
        $this->publishes([
            __DIR__.'/../dist' => public_path('assets/decoy')
        ], 'assets');

        // Publish lanaguage files
        $this->publishes([
            __DIR__.'/../lang' => resource_path('lang/vendor/decoy')
        ], 'lang');

        // Register views
        $this->loadViewsFrom(__DIR__.'/../views', 'decoy');

        // Load translations
        $this->loadTranslationsFrom(__DIR__.'/../lang', 'decoy');

        // Load migrations
        $this->loadMigrationsFrom(__DIR__.'/../migrations/');
    }
1031431
public function fixfiles()
    {
        Deprecation::notice('5.0');
        if (!Permission::check('ADMIN')) {
            return Security::permissionFailure($this);
        }

        $files = File::get();
        foreach ($files as $file) {
            $file->updateFilesystem();
            echo "<li>", $file->Filename;
            $file->write();
        }
        echo "<p>Done!";
    }
1012491
public function actionTemplates()
    {
        $foundTemplates = $this->findTemplatesFiles();

        if (!$foundTemplates) {
            $this->notifyNoTemplatesFound();
        } else {
            $this->notifyTemplatesCanBeGenerated($foundTemplates);
        }
    }
1293196
public static function generateSharedDirs()
    {
        /** @var array $dirs */
        $dirs = \Deployer\get('shared_dirs');

        foreach ($dirs as $dir) {
            $cmd = "mkdir -p {{deploy_path}}/shared/$dir";
            \Deployer\run($cmd);
        }
    }
1073639
protected function registerConfigFiles()
    {
        if (isset($this->dir) and isset($this->configFiles) and is_array($this->configFiles)) {
            foreach ($this->configFiles as $key) {
                $path = $this->getConfigFilePath($key);
                //$this->mergeConfigFrom($this->getConfigFilePath($filename), $filename);
                $config = $this->app->make('config')->get($key, [ ]);
                $this->app->make('config')->set($key, array_replace_recursive(require $path, $config));
            }
        }
    }
157075
public function content()
    {
        $path = '../App/' . $this->viewsDir . $this->view . '.phtml';
        if (file_exists($path)) {
            require $path;

        } else {
            die('No view file ' . $this->view . ' present in view directory.');
        }
    }
1197019
private function getContent(): void
    {
        foreach ($this->files as $item) {

            if (is_file($item)) {
                $this->readFileContent($item);
            }

            if (is_dir($item)) {
                $this->readDirectoryContent($item);
            }
        }
    }
676447
protected function doSetupDirectories() {
    $destination = $this->getInstallationDirectory();
    $this->write('Prepare custom projects directory at <comment>%s</comment>', $this->shortenDirectory($destination));
    $this->fs->emptyDirectory($destination);

    $destination = $this->getDefaultDirectory();
    $this->write('Make <comment>%s</comment> writable', $this->shortenDirectory($destination));
    chmod($destination, 0755);
  }
104161
protected function _set_files(){
    // Shortcuts for files and dir
    if ( isset($this->cfg['params']['f']) ){
      $this->cfg['params']['files'] = $this->cfg['params']['f'];
      unset($this->cfg['params']['f']);
    }
    if ( isset($this->cfg['params']['d']) ){
      $this->cfg['params']['dir'] = $this->cfg['params']['d'];
      unset($this->cfg['params']['d']);
    }
    // File
    if ( !empty($this->cfg['ext']) && is_file($this->fpath.$this->cfg['url']) ){
      $res = $this->get_file();
    }
    // Preconfigured
    else if ( isset($this->cfg['params']['id']) ){
      $res = $this->get_preconfig();
    }
    // List of files
    else if ( isset($this->cfg['params']['files']) && is_dir($this->fpath.$this->cfg['url']) ){
      $res = $this->get_files();
    }
    // Directory content
    // Vue component
    else if ( isset($this->cfg['params']['dir']) && is_dir($this->fpath.$this->cfg['url']) ){
      $res = $this->get_dir();
    }
    else if ( $this->cfg['is_component'] && is_dir($this->fpath.$this->cfg['url']) ){
      //cpStart:
      $res = [];
      $this->cfg['num'] = 0;
      foreach ( $this->cfg['components'] as $i => $cp ){
        if ( !isset($res[$cp]) ){
          $res[$cp] = $this->get_dir($this->cfg['url'].$cp);
          if ( $res[$cp] ){
            $dir = false;
            foreach ( $res[$cp] as $type => $files ){
              if ( !$dir && count($files) ){
                $dir = $this->fpath.\dirname($files[0]);
              }
              $this->cfg['num'] += \count($files);
            }
            /*
            if ( $dir && is_file($dir.'/bbn.json') ){
              $json = json_decode(file_get_contents($dir.'/bbn.json'));
              if ( isset($json->components) ){
                foreach ( $json->components as $tmp ){
                  if ( !isset($res[$tmp]) && !\in_array($tmp, $this->cfg['components'], true) ){
                    $this->cfg['components'][] = $tmp;
                    goto cpStart;
                    break;
                  }
                }
              }
            }
            */
          }
        }
      }
    }
    // Last but not least, libraries!
    else if ( isset($this->cfg['params']['lib']) ){
      $res = $this->get_libs();
      // Adding dirs to config
      if ( !empty($this->cfg['params']['dirs']) ){
        $dirs = explode(',', $this->cfg['params']['dirs']);
        foreach ( $dirs as $d ){
          if ( $r = $this->get_dir($d) ){
            $this->add($res, $r);
          }
        }
      }
    }
    $this->cfg['content'] = $res ?? [];
    return $this;
  }
324194
public function AddFileDescription() {
        $output = CodeSnippets\PhpDocSnippets::OPENING . $this->_LF .
                strtr(CodeSnippets\PhpDocSnippets::AUTHOR, $this->placeholders) . $this->_LF .
                strtr(CodeSnippets\PhpDocSnippets::COPYRIGHT, $this->placeholders) . $this->_LF .
                strtr(CodeSnippets\PhpDocSnippets::LICENCE, $this->placeholders) . $this->_LF .
                strtr(CodeSnippets\PhpDocSnippets::LINK, $this->placeholders) . $this->_LF .
                strtr(CodeSnippets\PhpDocSnippets::SINCE, $this->placeholders) . $this->_LF .
                strtr(CodeSnippets\PhpDocSnippets::PACKAGE, $this->placeholders) . $this->_LF .
                CodeSnippets\PhpDocSnippets::CLOSING . $this->_LF;
        fwrite($this->writer, $output);
    }
531914
protected function publishResources(): void
    {
        $this->publishes([realpath(__DIR__.'/../../database/migrations') => database_path('migrations')], 'cortex-contacts-migrations');
        $this->publishes([realpath(__DIR__.'/../../resources/lang') => resource_path('lang/vendor/cortex/contacts')], 'cortex-contacts-lang');
        $this->publishes([realpath(__DIR__.'/../../resources/views') => resource_path('views/vendor/cortex/contacts')], 'cortex-contacts-views');
    }
1045315
public function publishFiles()
    {
        $this->publishes([
            __DIR__ . '/../config/avored-ecommerce.php' => config_path('avored-ecommerce.php'),
        ], 'config');
        $this->publishes([
            __DIR__ . '/../config/avored-auth.php' => config_path('avored-auth.php'),
        ], 'config');

        $this->publishes([
            __DIR__ . '/../resources/lang' => base_path('themes/avored/default/lang/vendor')
        ], 'avored-module-lang');

        $this->publishes([
            __DIR__ . '/../resources/views' => base_path('themes/avored/default/views/vendor')
        ], 'avored-module-views');
        $this->publishes([
            __DIR__ . '/../database/migrations' => database_path('avored-migrations'),
        ]);
    }
127388
protected function makeFiles()
    {
        $this->namespace = $this->getRootNameSpace();

        $this->className = $this->getClassName();

        // copy files
        $this->copy([
            __DIR__.'/stubs/extension/view.stub'       => 'resources/views/index.blade.php',
            __DIR__.'/stubs/extension/.gitignore.stub' => '.gitignore',
            __DIR__.'/stubs/extension/README.md.stub'  => 'README.md',
            __DIR__.'/stubs/extension/LICENSE.stub'    => 'LICENSE',
        ]);

        // make composer.json
        $composerContents = str_replace(
            [':package', ':namespace', ':class_name'],
            [$this->package, str_replace('\\', '\\\\', $this->namespace).'\\\\', $this->className],
            file_get_contents(__DIR__.'/stubs/extension/composer.json.stub')
        );
        $this->putFile('composer.json', $composerContents);

        // make class
        $classContents = str_replace(
            [':namespace', ':class_name', ':title', ':path', ':base_package'],
            [$this->namespace, $this->className, Str::title($this->className), basename($this->package), basename($this->package)],
            file_get_contents(__DIR__.'/stubs/extension/extension.stub')
        );
        $this->putFile("src/{$this->className}.php", $classContents);

        // make service provider
        $providerContents = str_replace(
            [':namespace', ':class_name', ':base_package', ':package'],
            [$this->namespace, $this->className, basename($this->package), $this->package],
            file_get_contents(__DIR__.'/stubs/extension/service-provider.stub')
        );
        $this->putFile("src/{$this->className}ServiceProvider.php", $providerContents);

        // make controller
        $controllerContent = str_replace(
            [':namespace', ':class_name', ':base_package'],
            [$this->namespace, $this->className, basename($this->package)],
            file_get_contents(__DIR__.'/stubs/extension/controller.stub')
        );
        $this->putFile("src/Http/Controllers/{$this->className}Controller.php", $controllerContent);

        // make routes
        $routesContent = str_replace(
            [':namespace', ':class_name', ':path'],
            [$this->namespace, $this->className, basename($this->package)],
            file_get_contents(__DIR__.'/stubs/extension/routes.stub')
        );
        $this->putFile('routes/web.php', $routesContent);
    }