title: Passing "\" and "/" in variable via Laravel Route
body: <p>First off, apologies if this is a bad question/practice. I'm very new to Laravel, so I'm still getting to grips with it.</p>
  
  <p>I'm attempting to pass a variable that contains forward slashes (/) and backwards slashes () in a Laravel 5 route and I'm having some difficulties.</p>
  
  <p>I'm using the following: <code>api.dev/api/v1/service/DfDte\/uM5fy582WtmkFLJg==</code>.</p>
  
  <p><em>Attempt 1:</em></p>
  
  <p>My first attempt used the following code and naturally resulted in a 404.</p>
  
  <p><strong>Route:</strong></p>
  
  <pre><code>Route::group(array('prefix' =&gt; 'api/v1'), function() {
      Route::resource('service', 'ServiceController');
  });
  </code></pre>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code>public function show($service) {
      return $service;
  }
  </code></pre>
  
  <p><strong>Result:</strong></p>
  
  <pre><code>404
  </code></pre>
  
  <p><em>Attempt 2:</em></p>
  
  <p>I did a bit of searching on StackOverflow and ended up using the following code, which almost works, however, it appears to be converting \ to /.</p>
  
  <p><strong>Route:</strong></p>
  
  <pre><code>Route::group(array('prefix' =&gt; 'api/v1'), function() {
      Route::get('service/{slashData}', 'ServiceController@getData')
      -&gt;where('slashData', '(.*)');
  });
  </code></pre>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code>public function getData($slashData = null) {
      if($slashData) {
          return $slashData;
      }
  }
  </code></pre>
  
  <p><strong>Result:</strong></p>
  
  <pre><code>DfDte//uM5fy582WtmkFLJg==
  </code></pre>
  
  <p>As you can see, it's passing the var but appears to be converting the \ to /.</p>
  
  <p>I'm attempting to create an API and unfortunately the variable I'm passing is out of my control (e.g. I can't simply not use \ or /). </p>
  
  <p>Does anyone have any advice or could point me in the right direction?</p>
  
  <p>Thanks.</p>