Fixed generating APP KEY with 'composer update'

This commit is contained in:
Julian Prieber 2022-06-14 23:45:11 +02:00
parent 105e3e21ce
commit d9ccad6c7e
2 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,7 @@
{
"name": "khashayarzavosh/littlelink-admin",
"name": "julianprieber/littlelink-custom",
"type": "project",
"description": "Littlelink admin is an admin panel for littlelink",
"description": "LittleLink Custom is a highly customizable link sharing platform",
"keywords": ["link"],
"license": "GPL-3.0-or-later",
"require": {
@ -44,9 +44,7 @@
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
"post-update-cmd": ["echo.> storage/app/ISINSTALLED"]
},
"extra": {
"laravel": {

View File

@ -17,11 +17,14 @@ use App\Http\Controllers\UserController;
|
*/
// Prevents section below from being run by 'composer update'
if(file_exists(base_path('storage/app/ISINSTALLED'))){
// generates new APP KEY if no one is set
if(EnvEditor::getKey('APP_KEY')==''){Artisan::call('key:generate');}
// copies template meta config if none is present
if(!file_exists(base_path("config/advanced-config.php"))){copy(base_path('storage/templates/advanced-config.php'), base_path('config/advanced-config.php'));}
}
//Changes the homepage to a LittleLink Custom profile if set in the config
if(config('advanced-config.custom_home_url') != '') {