1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-25 01:05:36 +00:00

Update AdminSettingsController

This commit is contained in:
Daniel Supernault 2019-06-13 19:45:09 -06:00
parent bf08cfd471
commit 8e5e2fbc5f
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 3 additions and 6 deletions

View file

@ -7,7 +7,6 @@ use Illuminate\Http\Request;
use Carbon\Carbon; use Carbon\Carbon;
use App\{Comment, Like, Media, Page, Profile, Report, Status, User}; use App\{Comment, Like, Media, Page, Profile, Report, Status, User};
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Jackiedo\DotenvEditor\Facades\DotenvEditor;
use App\Util\Lexer\PrettyNumber; use App\Util\Lexer\PrettyNumber;
trait AdminSettingsController trait AdminSettingsController
@ -24,8 +23,9 @@ trait AdminSettingsController
return view('admin.settings.backups', compact('files')); return view('admin.settings.backups', compact('files'));
} }
public function settingsConfig(Request $request, DotenvEditor $editor) public function settingsConfig(Request $request)
{ {
$editor = [];
return view('admin.settings.config', compact('editor')); return view('admin.settings.config', compact('editor'));
} }
@ -50,9 +50,7 @@ trait AdminSettingsController
$this->validate($request, [ $this->validate($request, [
'APP_NAME' => 'required|string', 'APP_NAME' => 'required|string',
]); ]);
Artisan::call('config:clear'); // Artisan::call('config:clear');
DotenvEditor::setKey('APP_NAME', $request->input('APP_NAME'));
DotenvEditor::save();
return redirect()->back(); return redirect()->back();
} }

View file

@ -17,7 +17,6 @@ use App\{
use DB, Cache; use DB, Cache;
use Carbon\Carbon; use Carbon\Carbon;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Jackiedo\DotenvEditor\DotenvEditor;
use App\Http\Controllers\Admin\{ use App\Http\Controllers\Admin\{
AdminDiscoverController, AdminDiscoverController,
AdminInstanceController, AdminInstanceController,