title: Larvel 9 Edit/Update functionality returning Call to a member function store() on null
body: <p>I have a blog where I am creating an update function and I removed the required parameter from my 'image' field and set it to 'nullable' since it makes sense to give the user an option to change the image if they want to or not after creating their post.</p>
  <p>Update function</p>
  <pre><code>public function update(Request $request, Posts $post) {
      $formFields = $request-&gt;validate([
          'title' =&gt; 'required|min:3|max:50',
          'image' =&gt; 'nullable|image|mimes:jpg,png,jpeg,gif,svg|max:2048',
          'sub_title' =&gt; 'required|min:3|max:100',
          'tags' =&gt; 'required|min:3|max:20',
          'content' =&gt; 'required',
          'featured' =&gt; 'nullable',
      ]);
  
      $image_path = $request-&gt;file('image')-&gt;store('thumbnails', 'public');
  
      if($request-&gt;has('featured')) {
          Posts::where('featured', '=',1)
          -&gt;update(['featured' =&gt; false]);
      }
  
      $post-&gt;update([
          'title' =&gt; $request-&gt;post('title'),
          'image' =&gt; $image_path,
          'sub_title' =&gt; $request-&gt;post('sub_title'),
          'tags' =&gt; $request-&gt;post('tags'),
          'content' =&gt; $request-&gt;post('content'),
          'featured' =&gt; ($request-&gt;has('featured')) ? true : false,
      ]);
  
      return redirect('/')-&gt;with('message', 'Post updated successfully!');  
  }
  </code></pre>
  <p>More specifically, the error is being pointed out on this line:</p>
  <pre><code>$image_path = $request-&gt;file('image')-&gt;store('thumbnails', 'public');
  </code></pre>