json_decode() expects parameter 1 to be string, object given

$data = Weann\Socialite\Facades\Socialite::driver('wechat')->user();//是字符串
$data=json_encode($data);
$data=json_decode($data);

你可能感兴趣的:(json_decode() expects parameter 1 to be string, object given)