sj1370201

134 经验值

上几年班你就会知道,除非是bat级别大公司会去考虑php效率,基本人家也是用自己的框架,几千万pv的公司更多考虑的是nginx和mysql的压力,网站分布式,全站静态化或者局部静态化,利用缓存cdn等等,压力都在mysql和nginx上。解决php负载就是多加一台服务器就好了。

$oauthUser = \Socialite::with('weibo')
打出 $oauthUser 这个对象
Provider {#171 ▼
  #request: Request {#39 ▼
    #json: null
    #userResolver: Closure {#136 ▶}
    #routeResolver: Closure {#149 ▶}
    +attributes: ParameterBag {#41 ▶}
    +request: ParameterBag {#47 ▶}
    +query: ParameterBag {#47 ▶}
    +server: ServerBag {#44 ▶}
    +files: FileBag {#43 ▶}
    +cookies: ParameterBag {#42 ▶}
    +headers: HeaderBag {#45 ▶}
    #content: null
    #languages: null
    #charsets: null
    #encodings: null
    #acceptableContentTypes: null
    #pathInfo: "/auth/doubancallback"
    #requestUri: "/ice/public/auth/doubancallback?code=2ac2befd10925e41&state=wfe5TSrAtoReMQyNomocgQ41GWKDdmi5oaZE6x1w"
    #baseUrl: "/ice/public"
    #basePath: null
    #method: "GET"
    #format: null
    #session: Store {#110 ▶}
    #locale: null
    #defaultLocale: "en"
  }
  #clientId: "02f53dca4dee83c208dfb95ee9cb8b46"
  #clientSecret: "6d5e223b043077ff"
  #redirectUrl: "http://127.0.0.1/ice/public/auth/doubancallback"
  #parameters: []
  #scopes: []
  #scopeSeparator: ","
  #encodingType: 1
  #stateless: false
}
public function callback(){

    echo 123;
        $oauthUser = \Socialite::with('weibo')->user();
        dd($oauthUser);
        var_dump($oauthUser->getId());
        var_dump($oauthUser->getNickname());
        var_dump($oauthUser->getName());
        var_dump($oauthUser->getEmail());
        var_dump($oauthUser->getAvatar());
    }

可以登陆微博跳转,可以正常输出123,但是返回500错误....