title: Laravel - Update Content Error Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException
body: <p>Hello I have an error here saying:</p>
  
  <blockquote>
    <p>Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException
    No message</p>
  </blockquote>
  
  <p>when I update the content. I have a one image and one view to update.</p>
  
  <p>Below is my view. There is where the content is coded. I have the submit button here which will trigger the update. and the form <code>@update</code>.</p>
  
  <p><strong>admin/airlineplus/paxsafety.blade.php</strong></p>
  
  
  
  <pre class="lang-html prettyprint-override"><code>    {!! Form::open(['action'=&gt;['Admin\PaxSafetyController@update', $paxsafe-&gt;id], 'method' =&gt; 'POST','enctype'=&gt;'multipart/form-data']) !!}
  &lt;div class="form-group"&gt;   
      &lt;div class="table-responsive"&gt;  
          &lt;table class="table table-bordered"&gt;  
  
             &lt;tr&gt;  
                       &lt;th&gt;Upload new Image and Video&lt;/th&gt;
  
                       &lt;td&gt;  {{ Form::file('paxsafety_image[]') }} &amp;nbsp;&amp;nbsp; &lt;strong&gt;{{ $paxsafe-&gt;paxsafety_image }}&amp;nbsp;&amp;nbsp; &lt;/strong&gt; &lt;/td&gt; 
  
                       &lt;td&gt;    {{ Form::file('paxsafety_video[]') }} &amp;nbsp;&amp;nbsp; &lt;strong&gt;{{ $paxsafe-&gt;paxsafety_video }}&amp;nbsp;&amp;nbsp; &lt;/strong&gt;&lt;/td&gt;
  
  
                &lt;/td&gt;
             &lt;/tr&gt;  
          &lt;/table&gt;&lt;br&gt;&lt;br&gt;  
          {{Form::submit('submit', ['class'=&gt;'btn btn-primary', 'name'=&gt;'submit'])}}
      &lt;/div&gt; 
  &lt;/div&gt;  
  {!! Form::close() !!}
  </code></pre>
  
  <p>Next, my controller.</p>
  
  <p><strong>MyCoolController.php</strong></p>
  
  
  
  <pre class="lang-php prettyprint-override"><code>  $this-&gt;validate($request, [
          'paxsafety_image' =&gt; 'required',
          'paxsafety_video' =&gt; 'required'
      ]);
  
      if ($request-&gt;has('paxsafety_image') &amp;&amp; $request-&gt;has('paxsafety_video'))
      {   
          //Handle File Upload
  
          $paxSafety = [];
          foreach ($request-&gt;file('paxsafety_image') as $key =&gt; $file)
          {
              // Get FileName
              $filenameWithExt = $file-&gt;getClientOriginalName();
              //Get just filename
              $filename = pathinfo( $filenameWithExt, PATHINFO_FILENAME);
              //Get just extension
              $extension = $file-&gt;getClientOriginalExtension();
              //Filename to Store
              $fileNameToStore = $filename.'_'.time().'.'.$extension;
              //Upload Image
              $path = $file-&gt;storeAs('public/paxsafety_folder',$fileNameToStore);
              array_push($paxSafety, $fileNameToStore);
          }
  
  
          $paxSafetyVideo = [];
          foreach ($request-&gt;file('paxsafety_video') as $key =&gt; $file)
          {
              // Get FileName
              $filenameWithExt2 = $file-&gt;getClientOriginalName();
              //Get just filename
              $filename = pathinfo( $filenameWithExt2, PATHINFO_FILENAME);
              //Get just extension
              $extension2 = $file-&gt;getClientOriginalExtension();
              //Filename to Store
              $fileNameToStore2 = $filename.'_'.time().'.'.$extension2;
              //Upload Image
              $path = $file-&gt;storeAs('public/paxsafety_folder',$fileNameToStore2);
              array_push($paxSafetyVideo, $fileNameToStore2);
          }
  
  
          $fileNameToStore = serialize($paxSafety);
          $fileNameToStore2 = serialize($paxSafetyVideo);
      }
  
  
      foreach ($paxSafety as $key =&gt; $value) {
          foreach ($paxSafetyVideo as $key =&gt; $values) {
          $paxsafe = PaxSafety::find($id);
          if($request-&gt;hasFile('paxsafety_image')){
          $paxsafe-&gt;paxsafety_image = $value;
          }
          if($request-&gt;hasFile('paxsafety_video')){
          $paxsafe-&gt;paxsafety_video = $values;
          }
          $paxsafe-&gt;save();
          }
      }
      return redirect('/admin/airlineplus/paxsafety')-&gt;with('success', 'Inflight Magazine Content Inserted');
  </code></pre>
  
  <p>Guide me pls im new to coding in Laravel</p>