title: Laravel Socialite extend fields
body: <p>Basically I want to get the user profile link from Linkedin. I use Laravel Socialite with <a href="http://socialiteproviders.github.io/" rel="nofollow">Socialite Providers</a> to get the information from Linkedin.</p>
  
  <p>When the user is redirected back to my site with success I've debugged the information:</p>
  
  <pre><code>User {#285 ▼
    +token: "XXX"
    +id: "XXX"
    +nickname: null
    +name: "XXX"
    +email: "XXX"
    +avatar: "XXX"
    +"user": array:4 [▶]
  }
  </code></pre>
  
  <p>So i wanted to extend this information with "public-profile-url", this is a Basic Profile Field from Linkedin.</p>
  
  <p>I tried to do something like this in the "myproject/vendor/socialiteproviders/linkedin/src/Provider.php":</p>
  
  <pre><code>/**
   * {@inheritdoc}
   */
  protected function mapUserToObject(array $user)
  {
     return (new User())-&gt;setRaw($user)-&gt;map([
         'id' =&gt; $user['id'], 'nickname' =&gt; null,
         'name' =&gt; $user['formattedName'], 'email' =&gt; $user['emailAddress'],
         'avatar' =&gt; array_get($user, 'pictureUrl'),
         'link' =&gt; array_get($user, 'publicProfileUrl'),
     ]);
  }
  </code></pre>
  
  <p>But then link will be "null". </p>
  
  <p>Does somebody know how to solve this problem?</p>