title: Laravel Passing Data to Controller
body: <p>I just starting learning laravel and was wondering how to pass data unrelated to the route to a controller. What I'm trying to accomplish is create a todo item that is able to have nested items.</p>
  <h1>View</h1>
  <pre><code>&lt;a class=&quot;btn btn-success&quot; href=&quot;{{route('lists.items.create',4)}}&quot;&gt;Create New Item&lt;/a&gt;
  </code></pre>
  <p>The 4 is just a hard-coded example to see if it was working.</p>
  <h1>Controller</h1>
  <pre><code>public function create(TodoList $list, $item_id = null)
  {
      dd($item_id);
      return view('items.create', compact('list'));
  }
  </code></pre>
  <p>So if your creating an item and don't pass in a parameter for id, it will default to <code>null</code> otherwise set it to whatever was passed in. However I'm getting a <code>NotFoundHttpException</code>. How would I be able to accomplish this.</p>
  <p>Any help Welcome :)</p>