title: Passing parameters(current selected $this->user->id and not the auth()->user()->id) from view to createShowModal in livewire + laravel
body: <p>I want to pass the current selected user id to showmodal in livewire and in every attempt when I click to showmodal button I get this error:
  <a href="https://i.stack.imgur.com/KJqDy.png" rel="nofollow noreferrer">enter image description here</a>
  and if I delete {{$user-&gt;id}} the showmodal appears but when I submit the entered data I got the same error like:
  <a href="https://i.stack.imgur.com/ETKwi.png" rel="nofollow noreferrer">enter image description here</a>
  and this is my model data method:
  /** * The data for the model mapped * in this component.</p>
  <pre><code>* * @return void */ 
  public function modelData() 
  { 
      return [ 
          'user_id' =&gt; auth()-&gt;user()-&gt;id, 
          'related_id' =&gt; $this-&gt;user-&gt;id, 
          'treatment' =&gt; $this-&gt;treatment, 
          'sub_treatment' =&gt; $this-&gt;sub_treatment, 
          'status' =&gt; $this-&gt;status, 
      ]; 
  }
  </code></pre>
  <p>the create method:</p>
  <pre><code>/** * The create function. 
  * * @return void */ 
  public function create() 
  { 
       $this-&gt;validate(); 
       Appointment::create($this-&gt;modelData()); 
       $this-&gt;modalFormVisible = false; $this-&gt;reset(); 
  }
  </code></pre>
  <p>the create show modal is:</p>
  <pre><code>/** * Shows the create modal 
  * * @return void */ 
  public function createShowModal()  
  { 
        $this-&gt;resetValidation(); 
        $this-&gt;reset(); 
        $this-&gt;modalFormVisible = true; 
  }
  </code></pre>
  <p>and the render method like:</p>
  <pre><code>public function render() 
  { 
       return view('livewire.user-appointments', [ 'data' =&gt; $this-&gt;read(), ]); 
  }
  </code></pre>
  <p>and the modal relationship is:
  App\User</p>
  <pre><code>public function appointments() 
  { 
       return $this-&gt;hasMany('App\Models\Appointment'); 
  }
  </code></pre>
  <p>App\Appointment</p>
  <pre><code>public function user() 
  { 
       return $this-&gt;belongsTo('App\Models\User'); 
  }
  </code></pre>
  <p>any help please!</p>