![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/ledger.corals.io/Corals/core/Theme/Commands/ |
<?php namespace Corals\Theme\Commands; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; class baseCommand extends Command { /** * The filesystem instance. * * @var \Illuminate\Filesystem\Filesystem */ protected $files; /** * Create a new route command instance. * * @param \Illuminate\Filesystem\Filesystem $files * @return void */ public function __construct(Filesystem $files) { parent::__construct(); $this->tempPath = $this->packages_path('tmp'); $this->files = $files; } protected function createTempFolder() { $this->clearTempFolder(); $this->files->makeDirectory($this->tempPath); } protected function clearTempFolder() { if ($this->files->exists($this->tempPath)) { $this->files->deleteDirectory($this->tempPath); } } protected function packages_path($path = '') { return storage_path("themes/$path"); } protected function theme_installed($themeName) { if (!\Theme::exists($themeName)) { return false; } $viewsPath = \Theme::find($themeName)->viewsPath; return $this->files->exists(themes_path("$viewsPath/theme.json")); } }