title: Laravel Passport Generate Refresh Token for API
body: <p>I have an <strong>existing</strong> API that uses Laravel Passport to grant access tokens.</p>
  <p>How do I use Laravel Passport to retrieve refresh tokens without accessing an http endpoint?</p>
  <p>So the access token is accessed like this:</p>
  <pre><code>$user-&gt;createToken('AppName')-&gt;accessToken;
  </code></pre>
  <p>How do I get the refresh token?</p>
  <p>I'm thinking something along these lines:</p>
  <pre><code>$user-&gt;createRefreshToken($accessToken)-&gt;refreshToken();
  </code></pre>