Add info method
This commit is contained in:
21
app/Console/Commands/HRCInfo.php
Normal file
21
app/Console/Commands/HRCInfo.php
Normal 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'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user