title: Laravel passport dynamic scopes
body: <p>is there a way to set the dynamic scopes of laravel passport instead of typing manually?</p>
  
  <p>I tried to create a table(MySql) with scope name and description, created a model Scope, but that model is not working in AuthServiceProvider</p>
  
  <pre><code>Passport::tokensCan([
             'view-dashboard' =&gt; 'View the contents of dashboard',
             'view-reports'   =&gt; 'View the detailed reports'
         ]);
  </code></pre>
  
  <p>How can i make the scopes dynamic ? i want to manage the scopes based on roles of users by creating some interface</p>
  
  <p>Edit: I could relate the solution to my present situation, and it really makes sense but can you just help we with the code of line </p>
  
  <pre><code>$token-&gt;scopes = user_scopes;
  </code></pre>
  
  <p>i am getting an Exception error <code>Attempt to assign property scopes of non-object</code> in the user model as i have added your code in my User class as mentioned. Can you just clear me how can i fetch the scope ids?</p>