title: Upload multiple forms no save in mysql database laravel 9
body: <p>could someone help me to find the error? only the post_image input is saved the others are not saved in the database what am I doing wrong?
  I've checked it several times but only the filename of the post_image field is saved in the database, the other files are not persisting in the database, could someone help me where I'm going wrong?
  Every help is welcome.
  Thank you very much in advance.</p>
  <p>create.blade.php</p>
  <pre><code>div class=&quot;form-group row&quot;&gt;
                      &lt;label for=&quot;post_image&quot; class=&quot;col-md-4 col-form-label text-md-right&quot;&gt;{{ __('Image') }}&lt;/label&gt;
  
                      &lt;div class=&quot;col-md-6&quot;&gt;
                          &lt;input type=&quot;file&quot; name=&quot;post_image&quot;/&gt;
  
                          @error('post_image')
                          &lt;span class=&quot;invalid-feedback&quot; role=&quot;alert&quot;&gt;
                                          &lt;strong&gt;{{ $message }}&lt;/strong&gt;
                                      &lt;/span&gt;
                          @enderror
                      &lt;/div&gt;
                      &lt;br&gt;
                      &lt;hr&gt;
  
                      &lt;label for=&quot;post_video&quot; class=&quot;col-md-4 col-form-label text-md-right&quot;&gt;{{ __('Video') }}&lt;/label&gt;
                      &lt;div class=&quot;col-md-6&quot;&gt;
                          &lt;input type=&quot;file&quot; name=&quot;post_video&quot;/&gt;
  
                          @error('post_video')
                          &lt;span class=&quot;invalid-feedback&quot; role=&quot;alert&quot;&gt;
                                          &lt;strong&gt;{{ $message }}&lt;/strong&gt;
                                      &lt;/span&gt;
                          @enderror
                      &lt;/div&gt;
  
                      &lt;br&gt;
                      &lt;hr&gt;
  
                      &lt;label for=&quot;post_gif&quot; class=&quot;col-md-4 col-form-label text-md-right&quot;&gt;{{ __('GIF') }}&lt;/label&gt;
                      &lt;div class=&quot;col-md-6&quot;&gt;
                          &lt;input type=&quot;file&quot; name=&quot;post_gif&quot;/&gt;
  
                          @error('post_gif')
                          &lt;span class=&quot;invalid-feedback&quot; role=&quot;alert&quot;&gt;
                                          &lt;strong&gt;{{ $message }}&lt;/strong&gt;
                                      &lt;/span&gt;
                          @enderror
                      &lt;/div&gt;
  
                      &lt;br&gt;
                      &lt;hr&gt;
                  &lt;/div&gt;
  </code></pre>
  <p>function store in controller --&gt;</p>
  <pre><code>public function store(Request $request, Community $community)
  {
      $user = Auth::user();
  
      $creds = $request-&gt;validate([
  
          'post_image' =&gt; '|image|mimes:jpeg,jpg,png,svg|max:18048',
          'post_video' =&gt; 'mimes:mp4,ogx,oga,ogv,ogg,webm|max:180048',
          'post_gif' =&gt; '|image|mimes:gif|max:18048',
  
  
          'title' =&gt;  ['required'],
          'post_text' =&gt;  ['required'],
          'post_url' =&gt;  ['required']
  
  
      ]);
  
      //IMAGE JPG,PNG,SVG
      if ($image = $request-&gt;file('post_image')) {
          $destinationPath = 'media/uploads';
          $profileImage = date('YmdHis') . &quot;.&quot; . $image-&gt;getClientOriginalExtension();
          $image-&gt;move($destinationPath, $profileImage);
          $input['post_image'] = &quot;$profileImage&quot;;
      }
      //END IMAGE JPG,PNG,SVG
  
      //VIDEO MP4
  
      if ($image = $request-&gt;file('post_video')) {
          $destinationPath = 'media/uploads';
          $profileImage = date('YmdHis') . &quot;.&quot; . $image-&gt;getClientOriginalExtension();
          $image-&gt;move($destinationPath, $profileImage);
          $inputmp4 ['post_video'] = &quot;$profileImage&quot;;
      }
  
      //END VIDEOS
  
      // GIF IMAGES
  
      if ($image = $request-&gt;file('post_gif')) {
          $destinationPath = 'media/uploads';
          $profileImage = date('YmdHis') . &quot;.&quot; . $image-&gt;getClientOriginalExtension();
          $image-&gt;move($destinationPath, $profileImage);
          $inputgif ['post_gif'] = &quot;$profileImage&quot;;
      }
  
      //END GIF IMAGES
  
  
  
      $post = $community-&gt;posts()-&gt;create
          (['user_id' =&gt; auth()-&gt;id(),
          'title' =&gt; $creds['title'],
          'post_text' =&gt; $creds['post_text'],
          'post_url' =&gt; $creds['post_url'],
          'post_image' =&gt; $input['post_image'] ?? '',
          'post_video' =&gt; $inputmp4['post_video'] ?? '',
          'post_gif' =&gt; $inputgif['post_gif'] ?? '',
  
  
  
  
  
      ]);
  
      return redirect()-&gt;route('communities.show', $community);
  
  }
  </code></pre>