title: Submitting a Form with Laravel
body: <p>I am creating an edit page for my posts. I would prefer to create an html form instead of using FORM:: so I can really learn. I am having an issue when I try to submit the data to the right controller method.</p>
  
  <p>The tutorial I am using says to use </p>
  
  <pre><code>{!! Form::open(['action' =&gt; ['PostsController@update', $post-&gt;id], 'method' =&gt; 'POST'])!!}
  </code></pre>
  
  <p>Using my limited knowledge I tried to recreate this as </p>
  
  <pre><code>&lt;form action="{!! Route::post('/posts', ['PostsController@update', $post-&gt;id]) !!}" method="POST"&gt;
  </code></pre>
  
  <p>underneath both I am using <code>&lt;input name="_method" type="hidden" value="PUT"&gt;</code></p>
  
  <p>The error I get is `"</p>
  
  <blockquote>
    <p>Object of class Illuminate\Routing\Route could not be converted to
    string (View:
    /Users/Chris/code/chris/resources/views/posts/edit.blade.php)</p>
  </blockquote>
  
  <p>My web.php file has <code>Route::resource('posts', 'PostsController');</code> which as worked for everything else until now. In my contoller, my update method has </p>
  
  <pre><code>public function update(Request $request, $id)
  {
       $this-&gt;validate($request, [
          'title' =&gt; 'required',
          'body' =&gt; 'required'
      ]);
      // Create Post
      $post = Post::find($id);
      $post-&gt;title = $request-&gt;input('title');
      $post-&gt;body = $request-&gt;input('body');
      $post-&gt;save();
  
      return redirect('/')-&gt;with('success', 'Post Updated');
  }
  </code></pre>
  
  <p>What would the correct action be to submit an update for my info?</p>
  
  <p>Thanks so much in advance!</p>