title: Getting value to show up using livewire
body: <p>I'm using laravel and livewire and I'm trying to create an edit page. What I'm trying to do is get the value to show up in the textbox.
  So for example my edit page has product info that I'm trying to edit, but my product name isn't displaying in the textbox.</p>
  <p>Here is my code</p>
  <p>My ProductEdit.php</p>
  <pre><code>&lt;?php
  
  namespace Modules\Products\Http\Livewire;
  
  use App\Models\Product;
  use Livewire\Component;
  
  class ProductsEdit extends Component
  {
      public $name;
      public $product;
  
      public function render()
      {
          return view('products::livewire.edit-products', [
              'name' =&gt; $this-&gt;product-&gt;name
          ]);
      }
  
      public function updateProduct()
      {
          dd($this-&gt;name);
      }
  }
  </code></pre>
  <p>My edit-products.blade.php</p>
  <pre><code>&lt;div class=&quot;mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2&quot;&gt;
      &lt;input class=&quot;shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline&quot;
                      id=&quot;product_name&quot;
                      type=&quot;text&quot;
                      name=&quot;product_name&quot;
                      value=&quot;{{ $product-&gt;name }}&quot;
                      wire:model=&quot;name&quot;
                  &gt;
  &lt;/div&gt;
  
  &lt;button wire:click=&quot;updateProduct&quot; class=&quot;bg-green-400 hover:bg-green-300 text-green-800 font-bold py-2 px-4 rounded inline-flex items-center&quot;&gt;Save&lt;/button&gt;
  </code></pre>