Merge pull request #560 from 1day2die/development
show branchname in footer
This commit is contained in:
commit
daa0b53c37
2 changed files with 24 additions and 3 deletions
|
@ -107,12 +107,33 @@ class AppServiceProvider extends ServiceProvider
|
|||
Artisan::call('cache:clear');
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
Artisan::call('config:clear');
|
||||
Artisan::call('cache:clear');
|
||||
$stringfromfile = file(base_path().'/.git/HEAD');
|
||||
Log::debug(base_path().'/.git/HEAD');
|
||||
|
||||
$firstLine = $stringfromfile[0]; //get the string from the array
|
||||
|
||||
$explodedstring = explode("/", $firstLine, 3); //seperate out by the "/" in the string
|
||||
|
||||
$branchname = $explodedstring[2]; //get the one that is always the branch name
|
||||
} catch (Exception $e) {
|
||||
$branchname = "unknown";
|
||||
Log::error($e);
|
||||
}
|
||||
config(['BranchName' => $branchname]);
|
||||
|
||||
|
||||
// Set Discord-API Config
|
||||
config(['services.discord.client_id' => config('SETTINGS::DISCORD:CLIENT_ID')]);
|
||||
config(['services.discord.client_secret' => config('SETTINGS::DISCORD:CLIENT_SECRET')]);
|
||||
} catch (Exception $e) {
|
||||
error_log("Settings Error: Could not load settings from database");
|
||||
Log::error("Settings Error: Could not load settings from database");
|
||||
error_log("Settings Error: Could not load settings from database. The Installation probably is not done yet.");
|
||||
error_log($e);
|
||||
Log::error("Settings Error: Could not load settings from database. The Installation probably is not done yet.");
|
||||
Log::error($e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -404,7 +404,7 @@
|
|||
href="{{ url('/') }}">{{ env('APP_NAME', 'Laravel') }}</a>.</strong>
|
||||
All rights
|
||||
reserved. Powered by <a href="https://controlpanel.gg">ControlPanel</a>. Version
|
||||
<b>{{ config('app')['version'] }}</b>
|
||||
<b>{{ config('app')['version'] }} - {{config("BranchName")}}</b>
|
||||
</footer>
|
||||
|
||||
<!-- Control Sidebar -->
|
||||
|
|
Loading…
Reference in a new issue