title: Call to undefined method Symfony\Component\HttpFoundation\Response::header()
body: <p>Hi i was using a cors middleware which seems to work fine until i added Laravel Passport now there is a problem with it.. it shows the error </p>
  
  <pre><code> Call to undefined method Symfony\Component\HttpFoundation\Response::header() on line number 36 
  </code></pre>
  
  <p>This is my middleware : </p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Middleware;
  
  use Closure;
  use Illuminate\Support\Facades\Response;
  
  class Cors
  {
  
      /**
       * Handle an incoming request.
       *
       * @param \Illuminate\Http\Request $request
       * @param \Closure $next
       * @return mixed
       */
      public function handle($request, Closure $next)
      {
  
  // ALLOW OPTIONS METHOD
          $headers = [
              'Access-Control-Allow-Origin' =&gt; '*',
              'Access-Control-Allow-Methods' =&gt; 'POST, GET, OPTIONS, PUT, DELETE',
              'Access-Control-Allow-Headers' =&gt; "Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Authorization , Access-Control-Request-Headers"
          ];
  
  
          if ($request-&gt;getMethod() == "OPTIONS") {
  // The client-side application can set only headers allowed in Access-Control-Allow-Headers
              return Response::make('OK', 200, $headers);
          }
  
          $response = $next($request);
          foreach ($headers as $key =&gt; $value)
              $response-&gt;header($key, $value);
          return $response;
      }
  
  }
  </code></pre>
  
  <p>the issue is after the if condition .. Any help will be appreaciated thanks </p>