12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace App\Http\Controllers\Api\Base;
- use App\Http\Controllers\Controller;
- use App\Services\Base\SettingService;
- use Illuminate\Http\Request;
- /**
- * Setting
- */
- class SettingController extends Controller
- {
- /**
- * @var SettingService
- */
- private $settingService;
- /**
- * SettingController constructor.
- *
- * @param SettingService $settingService
- */
- public function __construct(SettingService $settingService)
- {
- parent::__construct();
- $this->settingService = $settingService;
- }
- /**
- * 获取系统配置参数
- * @must
- * @param Request $request
- * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\Resources\Json\JsonResource
- * @throws \Illuminate\Validation\ValidationException
- */
- public function configs(Request $request)
- {
- $this->validate($request, ['keys' => 'required|array']);
- $configs = $this->settingService->handleConfigs($request->get('keys'));
- return $this->response->success(compact('configs'));
- }
- }
|