title: Dependent field in Laravel Nova using Nova Dependency Container
body: <p>I'm quite new to Laravel Nova, and I'm trying to implement dependent fields but there's no easy solution to it. I want to display a checkbox if a certain value is selected in a select dropdown. </p>
  
  <p>After a little searching, I found this: <a href="https://github.com/epartment/nova-dependency-container" rel="nofollow noreferrer">https://github.com/epartment/nova-dependency-container</a>. I'm trying to use this, but something's not working right. I'm using Laravel <code>v5.7</code> and Nova <code>v1.3.2</code>. Hence, I've installed <code>v1.1.2</code> of this package.</p>
  
  <p>I followed the installation guidelines and have written the following code:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Nova;
  
  ...
  use Epartment\NovaDependencyContainer\HasDependencies;
  use Epartment\NovaDependencyContainer\NovaDependencyContainer;
  
  ...
  class Submission extends Resource
  {
      use HasDependencies;
      ....
      public function fields(Request $request)
      {
          $fields[] = Select::make('Route', 'route')-&gt;options([
              0 =&gt; 'First Name',
              1 =&gt; 'First Name / Last Name',
              2 =&gt; 'Full Name'
          ])-&gt;displayUsingLabels();
  
          $fields[] = NovaDependencyContainer::make([
              Text::make('Title', 'title')
          ])-&gt;dependsOn('route', 2);
  
          ...
  
          return $fields;
      }
      ....
  }
  ?&gt;
  </code></pre>
  
  <p>I can see the field Route with the right options and values. However, when I select 'Full Name', the dependent field Title is not displayed. </p>
  
  <p>When I see the JSON response of the fields, this is what I get:</p>
  
  <pre><code>...
  {
      "component": "select-field",
      "prefixComponent": true,
      "indexName": "Route",
      "name": "Route",
      "attribute": "route",
      "value": null,
      "panel": null,
      "sortable": false,
      "textAlign": "left",
      "options": [
        {
          "label": "First Name",
          "value": 0
        },
        {
          "label": "First Name / Last Name",
          "value": 1
        },
        {
          "label": "Full Name",
          "value": 2
        }
      ]
    },
    {
      "component": "nova-dependency-container",
      "prefixComponent": true,
      "indexName": "",
      "name": "",
      "attribute": "",
      "value": [],
      "panel": null,
      "sortable": false,
      "textAlign": "left",
      "fields": [
        {
          "component": "text-field",
          "prefixComponent": true,
          "indexName": "Title",
          "name": "Title",
          "attribute": "title",
          "value": null,
          "panel": null,
          "sortable": false,
          "textAlign": "left"
        }
      ],
      "dependencies": [
        {
          "field": "route",
          "value": 2
        }
      ]
    },
  ...
  </code></pre>
  
  <p>I'm not sure where I'm going wrong. Would be great if someone could guide me here. Or if there's another solution that works.</p>
  
  <p>Thanks!</p>