Owl\Http\Controllers\MailNotifyController::update PHP Method

update() public method

設定を更新
public update ( Illuminate\Http\Request $request, UserService $userService, MailNotifyService $mailNotifyService ) : Illuminate\Http\Response
$request Illuminate\Http\Request
$userService Owl\Services\UserService
$mailNotifyService Owl\Services\MailNotifyService
return Illuminate\Http\Response
    public function update(Request $request, UserService $userService, MailNotifyService $mailNotifyService)
    {
        $params = $request->only(['type', 'flag']);
        $result = $mailNotifyService->updateSetting($userService->getCurrentUser()->id, $params['type'], $params['flag']);
        return response()->json(['result' => $result]);
    }
MailNotifyController