title: Enforce Global Scope Across all models
body: <p>we are developing an application based on Laravel Spark. as part of this we want to tie resources to a specfic team.</p>
  
  <p>I know that we can add a global scope such as:</p>
  
  <pre><code>&lt;?php
  
  
  namespace App\Scopes;
  
  use Illuminate\Database\Eloquent\Scope;
  use Illuminate\Database\Eloquent\Model;
  use Illuminate\Database\Eloquent\Builder;
  
  class TeamScope implements Scope
  {
      /**
       * Apply the scope to a given Eloquent query builder.
       *
       * @param  \Illuminate\Database\Eloquent\Builder  $builder
       * @param  \Illuminate\Database\Eloquent\Model  $model
       * @return void
       */
      public function apply(Builder $builder, Model $model)
      {
          $builder-&gt;where('team_id', '=',Auth()-&gt;user()-&gt;currentTeam-&gt;id );
      }
  }
  </code></pre>
  
  <p>but according to the docs we have to add that to each model that we want to restrict like so:</p>
  
  <pre><code>protected static function boot()
  {
      parent::boot();
      static::addGlobalScope(new TeamScope);
  }
  </code></pre>
  
  <p>my issue with this is that it will be possible to create future models and forget to apply this code. Which could give us a security hole?</p>
  
  <p>is there any way to enforce the scope across the board?</p>