title: API with Lumen Framework authorize not work
body: <p>I working a simple API with Lumen, But I encounter a problem. I want to delete the user if he is the user, but my authorize is not work.</p>
  
  <p>For the login I use JWT token.</p>
  
  <p>UserController.php</p>
  
  <pre><code>    /**
       * Delete user by user id.
       *
       * @param int $id
       *
       * @return mixed
       */
      public function delete($id)
      {
          $user = User::find($id);
  
          $this-&gt;authorize('delete', $user);
  
          $user-&gt;delete();
  
          return response()-&gt;json([
              'success'   =&gt;  'User deleted with success'
          ], 200);
      }
  </code></pre>
  
  <p>UserPolicy.php</p>
  
  <pre><code>class UserPolicy
  {
  
      public function delete(User $user, User $user_current)
      {
          return $user-&gt;id === $user_current-&gt;id;
      }
  
  }
  </code></pre>
  
  <p>AuthServiceProvider.php</p>
  
  <pre><code>    public function boot()
      {
          Gate::policy(User::class, UserPolicy::class);
  
          $this-&gt;app['auth']-&gt;viaRequest('api', function ($request) {
              if ($request-&gt;header('Authorization')) {
                  return User::where('api_token', $request-&gt;input('api_token'))-&gt;first();
              }
          });
      }
  </code></pre>
  
  <p>I I do not understand why it does not work.</p>