title: Laravel Route /{username} in form action
body: <p>I'm currently dealing with Image Upload in Laravel-5.3.
  My "profile page" routes are defined as:</p>
  
  <pre><code>/* GET request to show the profile page */
  
  Route::get('/{username}', [
      'uses' =&gt; '\App\Http\Controllers\ProfileController@getProfile',
      'as'   =&gt; 'profile.index',
  
  ]);
  
  /* POST request to update the Avatar (display pic) */
  
  Route::post('/{username}', [
      'uses' =&gt; '\App\Http\Controllers\ProfileController@updateAvatar',
      'as'   =&gt; 'profile.index',
  ]);
  </code></pre>
  
  <p>Thus, the profile URL pretty much looks like <code>example.com/john</code> (let "john" be the username)</p>
  
  <p>In the form though, I have to define the "action".</p>
  
  <pre><code>&lt;form enctype="multipart/form-data" action="" method="POST"&gt;
  </code></pre>
  
  <p>How can I define the route in the form action so that the users are redirected to their own respective routes; something like " <code>example.com/john</code> ".</p>
  
  <p>I guess I can't directly define <code>&lt;form action="/{username}"&gt;</code> as I'll be taken to <code>example.com/{username}</code> instead.</p>