mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 16:53:17 +00:00
Update AdminSettingsController
This commit is contained in:
parent
bf08cfd471
commit
8e5e2fbc5f
2 changed files with 3 additions and 6 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue