title: Update Data in Laravel
body: <p>This is my code :</p>
  
  <p>Route:</p>
  
  <pre><code>Route::get('/editposts/{id}', function ($id) {
      $showpost = Posts::where('id', $id)-&gt;get();
      return view('editposts', compact('showpost'));
  });
  
  
  Route::post('/editposts', array('uses'=&gt;'PostController@Update'));
  </code></pre>
  
  <p>Controller :</p>
  
  <pre><code>public function Update($id)
  {
  
      $Posts = Posts::find($id);
      $Posts-&gt;Title = 10;
      $Posts-&gt;Content = 10;
      $Posts-&gt;save();
  
      //return Redirect()-&gt;back(); Input::get('Title')
  
  }
  </code></pre>
  
  <p>and View:</p>
  
  <pre><code>            @foreach($showpost as $showpost)
  
              &lt;h1&gt;Edit Posts :&lt;/h1&gt;
  
              {{ Form::open(array('url'=&gt;'editposts', 'method'=&gt;'post')) }}
              Title : {{ Form::text('Title', $showpost-&gt;Title) }} &lt;br&gt; Content : {{ Form::text('Content', $showpost-&gt;Content ) }} &lt;br&gt; {{ Form::submit('Update') }}
              {{ Form::close() }}
  
              @endforeach
  </code></pre>
  
  <p>but when I want to Update my data i receive an error :</p>
  
  <p><a href="http://localhost:8000/editposts/1" rel="nofollow noreferrer">http://localhost:8000/editposts/1</a></p>
  
  <p>Missing argument 1 for App\Http\Controllers\PostController::Update()</p>