From 6424b29580ea96e221b490a5b72cf3ba9db8dbfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Thu, 22 Sep 2022 00:57:54 +0300 Subject: [PATCH] updated info --- app/Utilities/Info.php | 18 ++++++++++++++++-- composer.json | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/app/Utilities/Info.php b/app/Utilities/Info.php index 903bc96a0..47bcbcde7 100644 --- a/app/Utilities/Info.php +++ b/app/Utilities/Info.php @@ -4,8 +4,10 @@ namespace App\Utilities; use App\Models\Auth\User; use App\Models\Common\Company; +use App\Models\Common\Contact; +use App\Models\Document\Document; use Composer\InstalledVersions; -use DB; +use Illuminate\Support\Facades\DB; class Info { @@ -13,8 +15,11 @@ class Info { return array_merge(static::versions(), [ 'api_key' => setting('apps.api_key'), + 'ip' => static::ip(), 'companies' => Company::count(), 'users' => User::count(), + 'invoices' => Document::invoice()->count(), + 'customers' => Contact::customer()->count(), 'php_extensions' => static::phpExtensions(), ]); } @@ -23,10 +28,12 @@ class Info { return [ 'akaunting' => version('short'), - 'laravel' => app()->version(), + 'laravel' => InstalledVersions::getPrettyVersion('laravel/framework'), 'php' => static::phpVersion(), 'mysql' => static::mysqlVersion(), + 'guzzle' => InstalledVersions::getPrettyVersion('guzzlehttp/guzzle'), 'livewire' => InstalledVersions::getPrettyVersion('livewire/livewire'), + 'omnipay' => InstalledVersions::getPrettyVersion('league/omnipay'), ]; } @@ -54,4 +61,11 @@ class Info return 'N/A'; } + + public static function ip() + { + return request()->header('CF_CONNECTING_IP') + ? request()->header('CF_CONNECTING_IP') + : request()->ip(); + } } diff --git a/composer.json b/composer.json index cd3735b0b..093763a76 100644 --- a/composer.json +++ b/composer.json @@ -28,6 +28,7 @@ "ext-xml": "*", "ext-zip": "*", "akaunting/laravel-apexcharts": "^2.0", + "akaunting/laravel-debugbar-collector": "^2.0", "akaunting/laravel-firewall": "^2.0", "akaunting/laravel-language": "^1.0", "akaunting/laravel-menu": "^2.0", @@ -37,7 +38,6 @@ "akaunting/laravel-setting": "^1.2", "akaunting/laravel-sortable": "^1.0", "akaunting/laravel-version": "^1.0", - "akaunting/laravel-debugbar-collector": "^2.0", "akaunting/module-offline-payments": "^3.0", "akaunting/module-paypal-standard": "^3.0", "barryvdh/laravel-debugbar": "^3.6",