Create constant CORE_PATH and rework project loaders

This commit is contained in:
2021-01-27 12:22:12 +03:00
parent 04e766af45
commit 23cb69919c
5 changed files with 10 additions and 8 deletions

View File

@@ -30,7 +30,7 @@ class HRCCommand extends Command
private function prepareInput()
{
$source_file = base_path() . '/../temp/' . $this->argument('source');
$source_file = CORE_PATH . '/temp/' . $this->argument('source');
$data = parse_ini_file($source_file);
if(isset($data['raw_result'])) {
@@ -42,7 +42,7 @@ class HRCCommand extends Command
private function prepareOutput()
{
$source_file = base_path() . '/../temp/' . $this->argument('source');
$source_file = CORE_PATH . '/temp/' . $this->argument('source');
$data = parse_ini_file($source_file);
if(isset($data['raw_result'])) {
@@ -54,7 +54,7 @@ class HRCCommand extends Command
public function save($result)
{
$result_file = base_path() . '/../temp/' . $this->argument('result');
$result_file = CORE_PATH . '/temp/' . $this->argument('result');
file_put_contents($result_file, json_encode($result));
}