Add stats and current git commit to footer

This commit is contained in:
2025-10-08 11:44:40 +02:00
parent e717b2bd07
commit 9e0042b09f
2 changed files with 26 additions and 1 deletions

19
app/Helpers/GitHelper.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
namespace App\Helpers;
use Illuminate\Support\Facades\Cache;
class GitHelper
{
public static function shortCommit()
{
return Cache::remember("git_commit", now()->addMinutes(60), function () {
try {
return trim(exec('git rev-parse --short HEAD'));
} catch (\Exception $e) {
return 'unknown';
}
});
}
}