title: How to get value from URL in Laravel 5.2?
body: <p>Routes.php</p>
  
  <pre><code>use Illuminate\Http\Request;
  Route::get('/age/{val}','AgeController@store');
  </code></pre>
  
  <p>AgeController.php</p>
  
  <pre><code>namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  
  use App\Http\Requests;
  
  class AgeController extends Controller
  {
  //
  
     public function store(Request $request)
      {
  
         $data = $request-&gt;input('val');
         var_dump($data); 
      }
  }
  </code></pre>
  
  <p>My url is <code>localhost/lara/public/age/20</code>.</p>
  
  <p>but</p>
  
  <pre><code>output:array(0) { }
  </code></pre>
  
  <p>When I change <code>$request-&gt;input('val',500);</code></p>
  
  <p>then output: <code>int(500)</code></p>
  
  <p>How to get 20 (val) in controller? Why array empty?</p>