app/Http/Controllers/Auth/LoginController.php
/**
     * Send the response after the user was authenticated.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
     */
Send the response after the user was authenticated.
Send the response after the user was authenticated .
protected function sendLoginResponse(Request $request)
    {
        session(['user_id' => Auth::user()->id]);
        session(['company_id' => Auth::user()->company_id]);
        $request->session()->regenerate();
        $this->clearLoginAttempts($request);
        if ($response = $this->authenticated($request, $this->guard()->user())) {
            return $response;
        }
        return $request->wantsJson()
            ? new JsonResponse([], 204)
            : redirect()->intended($this->redirectPath());
    }
protected function sendLoginResponse ( Request $ request ) { session ( [ 'user_id' => Auth :: user ( ) -> id ] ) ; session ( [ 'company_id' => Auth :: user ( ) -> company_id ] ) ; $ request -> session ( ) -> regenerate ( ) ; $ this -> clearLoginAttempts ( $ request ) ; if ( $ response = $ this -> authenticated ( $ request , $ this -> guard ( ) -> user ( ) ) ) { return $ response ; } return $ request -> wantsJson ( ) ? new JsonResponse ( [ ] , 204 ) : redirect ( ) -> intended ( $ this -> redirectPath ( ) ) ; }
Send the response after the user was authenticated.
Send the response after the user was authenticated .