mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-15 17:24:10 +00:00
Move global admin controllers from Admin to SuperAdmin namespace
Backup, Update, Modules, and global Settings controllers (mail config, PDF config, disk management, global settings) are application-wide features not scoped to a company. Move them from Admin/ to SuperAdmin/ to match the v3.0 UI structure where these live under Administration. Company-scoped settings controllers remain in Admin/Settings/.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\V1\SuperAdmin\Settings;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\GetSettingRequest;
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class GetSettingsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Handle the incoming request.
|
||||
*
|
||||
* @param Request $request
|
||||
* @return Response
|
||||
*/
|
||||
public function __invoke(GetSettingRequest $request)
|
||||
{
|
||||
$this->authorize('manage settings');
|
||||
|
||||
$setting = Setting::getSetting($request->key);
|
||||
|
||||
return response()->json([
|
||||
$request->key => $setting,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user