Add info method

This commit is contained in:
2021-01-27 16:36:49 +03:00
parent 354f91eded
commit bc0a22e3d8

View File

@@ -0,0 +1,21 @@
<?php
namespace App\Console\Commands;
use Illuminate\Support\Facades\Artisan;
class HRCInfo extends HRCCommand implements HRCCommandInterface
{
protected $signature = 'info';
public function command($input, $output = null)
{
$info = parse_ini_file(CORE_PATH . '/module.ini');
$info = array_change_key_case($info, true);
return [
'status' => 'success',
'version' => $info['info']['version'] ?? '0.0'
];
}
}