title: Laravel delete method not allowed
body: <p>I am writing a laravel api and when I try to make delete and post requests I keep getting a method not allowed exception.  Where should I be looking to diagnose this problem?   </p>
  
  <p>I have read though most of the other posts on this issue and here is what I have tried/looked at.
  • Made sure the route syntax was correct</p>
  
  <p>• Made sure it didn't conflict with another route</p>
  
  <p>• Made sure I was using the correct route (ran php artisan route:list to 
    double check)</p>
  
  <p>• Modified the .htaccess folder (maybe I did this incorrectly) to allow GET, POST, PUT, DELETE</p>
  
  <p>Here is what the route looks like in api.php</p>
  
  <pre><code>Route::middleware('auth:api')-&gt;get('/user', function (Request $request) {
      return $request-&gt;user();
  });
  Route::delete('delete/{id}', 'LoginController@delete');
  Route::get('stuff', 'LoginController@index');
  Route::get('stuff1/{Username}', 'LoginController@show');
  </code></pre>
  
  <p>here is the function in the controller</p>
  
  <pre><code> public function delete(Request $request, $id) {
  
          $user = Login::find($id);
          $user-&gt;delete();
          return "204";
      }
  </code></pre>
  
  <p>here is my .htaccess</p>
  
  <pre><code>   &lt;IfModule mod_rewrite.c&gt;
     &lt;IfModule mod_negotiation.c&gt;
         Options -MultiViews
     &lt;/IfModule&gt;
  
  RewriteEngine On
  
  # Redirect Trailing Slashes If Not A Folder...
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} (.+)/$
  RewriteRule ^ %1 [L,R=301]
  
  # Handle Front Controller...
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^ index.php [L]
  
  # Handle Authorization Header
  RewriteCond %{HTTP:Authorization} .
  RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  
   &lt;Limit GET POST PUT DELETE&gt;
   Allow from all
  &lt;/Limit&gt;
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>I can get around this issue by changing Route::delete() to Route::get() and achieve the same functionality but this doesn't seem like standard practice.</p>