title: Laravel:Call to a member function store() on null
body: <p>I'm using Laravel to get the request file from postman, however it seems Laravel cannot identify the file I posted. Following is my code:</p>
  
  <pre><code>namespace App\Http\Controllers;
  use App\Product;
  use Illuminate\Http\Request;
  
  class ProductImageController
  {
  public function update(Request $request, $id)
     {
          $path = $request-&gt;file('file')-&gt;store('images');
          $product = Product::find($id);
          $product-&gt;img_url = $path;
          return $product-&gt;save() ?
              response(["error_code" =&gt; 0, $product]) :
              response(["error_code" =&gt; 1]);
     }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/6lHpl.png" rel="nofollow noreferrer">Postman request</a></p>
  
  <p><a href="https://i.stack.imgur.com/6lHpl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6lHpl.png" alt="enter image description here"></a></p>