Guest User

Untitled

a guest
Jun 21st, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <?php
  2. /**
  3. * Execute the console command.
  4. */
  5. public function handle()
  6. {
  7. $name = strtolower($this->argument('name'));
  8. $current_theme = Config::get("theming.theme");
  9. $theme_path = site_path("themes/$current_theme");
  10.  
  11. $this->changeCss($theme_path, $current_theme, $name);
  12. $this->changeJs($theme_path, $current_theme, $name);
  13. $this->searchAndReplace("$theme_path/webpack.mix.js", $current_theme, $name); // change webpack.mix.js
  14. $this->searchAndReplace(site_path('settings/theming.yaml'), $current_theme, $name); // change theming.yaml to new theme
  15. $this->changeThemeDir(site_path('themes'), $current_theme, $name);
  16. }
Add Comment
Please, Sign In to add comment