public function switchToUser($id)
    {
        try {
            $user = $this->model->find($id);
            Session::put('original_user', Auth::id());
            Auth::login($user);
            return true;
        } catch (Exception $e) {
            throw new Exception("Error logging in as user", 1);
        }
    }
public function switchToUser($id)
    {
        try {
            $user = $this->model->find($id);
            Session::put('original_user', Auth::id());
            Auth::login($user);
            return true;
        } catch (Exception $e) {
            throw new Exception("Error logging in as user", 1);
        }
    }
public function switchToUser ( $ id ) { try { $ user = $ this -> model -> find ( $ id ) ; Session :: put ( 'original_user' , Auth :: id ( ) ) ; Auth :: login ( $ user ) ; return true ; } catch ( Exception $ e ) { throw new Exception ( "Error logging in as user" , 1 ) ; } }
Switch user login

@param  integer $id
@return boolean
Switch user login