getCurrentUser() public method

public getCurrentUser ( ) : stdclass
return stdclass | bool
Beispiel #1
0
 /**
  * Configに合わせてメール通知HTMLコンポーネントを返す
  *
  * @return View | null
  */
 protected function renderHtml()
 {
     if ($this->notifyEnable) {
         $notifyFlags = $this->mailNotifyService->getSettings($this->userService->getCurrentUser()->id);
         return view('user.edit._mail-notify', compact('notifyFlags'))->render();
     }
     return null;
 }
Beispiel #2
0
 /**
  * 設定を更新
  *
  * @param Request            $request
  * @param UserService        $userService
  * @param MailNotifyService  $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]);
 }