get(ISLOGIN)) { session()->set(RETURN_URL, $request->getUri()->getPath() . '?' . $request->getUri()->getQuery()); return redirect()->to('/login')->with('error', '먼저 로그인을하셔야합니다.'); } if (!in_array(session()->get('role'), $arguments)) { return redirect()->to('/login')->with( 'error', sprintf( "%s 회원님은 %s로서 접속에 필요한 권한[%s]이 없습니다. ", session()->get('name'), session()->get('role'), implode(",", $arguments) ) ); } } /** * Allows After filters to inspect and modify the response * object as needed. This method does not allow any way * to stop execution of other after filters, short of * throwing an Exception or Error. * * @param RequestInterface $request * @param ResponseInterface $response * @param array|null $arguments * * @return mixed */ public function after(RequestInterface $request, ResponseInterface $response, $arguments = null) { // } }