title: laravel livewire data not show in modal
body: <p>I can pass the data to component but in modal by Alpine js the data is null.</p>
  
  <p>this is class:</p>
  
  <pre><code>public $code, $products;
  
      public function getData($id)
      {
          $product = Product::find($id);
          $this-&gt;code = $product-&gt;code;
      }
  
    public function render()
      {
  
          $this-&gt;products = Product::latest()-&gt;get();
  
          return view('livewire.cabin');
      }
  </code></pre>
  
  <p>and this is the component:</p>
  
  <pre><code>&lt;div x-data="{open: false}"&gt;
      &lt;section&gt;
  if I use $code here the code value is shown !!!
  &lt;div&gt;{{ $code }}&lt;/div&gt;
          &lt;div class="slideCabin"&gt;
              @foreach($products as $product)
                  &lt;div&gt;
  &lt;img
  @click="open = true"
  wire:click="getData({{ $product-&gt;id }})"
  src="/images/allproducts/{{ $product-&gt;cover }}"
  &gt;
                  &lt;/div&gt;
              @endforeach
  
          &lt;/div&gt;
  
  
      &lt;/section&gt;
  
  
  </code></pre>
  
  <p>this is modal which is open by Alpine js by click on  tag:</p>
  
  <pre><code>    &lt;div id="backmodal" x-show="open"&gt;
  but, the code value is null:
   &lt;p&gt;{{ $code }}&lt;/p&gt;
  &lt;/div&gt;
  
  </code></pre>