title: Laravel Route variable limited to 17 characters
body: <p>In Laravel, I am trying to accomplish the ability to have a variable quantity of categories in a URL, followed by the slug. For example:</p>
  
  <p>www.trashaccount.com/category1/category2/slug</p>
  
  <p>I am using a route pattern in Laravel to identify the categories</p>
  
  <pre><code>Route::pattern('cat', '([-a-zA-Z0-9]+\/?)*');
  </code></pre>
  
  <p>and the demo/test route looks like this:</p>
  
  <pre><code>Route::get('test/{cat}/{slug}', function($cat, $slug) {
      $categories = explode('/', $cat);
      $i = 1;
      foreach($categories as $category)  {
          echo "category " . $i . ": " . $category . "&lt;br&gt;";
          $i++;
      }
      echo "slug: " . $slug . "&lt;br&gt;";
  });
  </code></pre>
  
  <p>This can be tested at www.trashaccount.com/test/{cat}/.../{slug}</p>
  
  <p>This code successfully pulls out a variable number of categories, of any character length; for example this works:</p>
  
  <p><a href="http://www.trashaccount.com/test/cat1/cat2/cat3/abcdefghijklmnopqrstuvwxyzabcdevg/my-slug" rel="nofollow">http://www.trashaccount.com/test/cat1/cat2/cat3/abcdefghijklmnopqrstuvwxyzabcdevg/my-slug</a></p>
  
  <p>Where it breaks, is in the number of characters of the final element, the {slug}. For some reason anything beyond 17 characters throws a NotFoundHttpException. So, this does not work:</p>
  
  <p><a href="http://www.trashaccount.com/test/cat1/abcdefghijklmnopqr" rel="nofollow">http://www.trashaccount.com/test/cat1/abcdefghijklmnopqr</a></p>
  
  <p>But if you simply delete the "r" (the 18h character), it works.</p>
  
  <p>To clarify (as my post was being misinterpreted on another forum), you can type as many categories as you want, they can be any length (respecting HTTP limits), and they will be accepted and processed. The final element that I have labeled as {slug}, can not be longer than 17 characters without throwing a NotFoundHttpException error.</p>
  
  <p>Does anybody know what I am doing wrong?</p>
  
  <p>Thanks!</p>