title: Getting error "Typed property must not be accessed before initialization" - Laravel Livewire
body: <h3>Description</h3>
  <p>I am type hinting model properties and trying to delete the invitation data. Below is the error which its throwing me back. Please help me with it, as I am unable to spot what is it that I'm missing.</p>
  <blockquote>
  <p>Typed property App\Http\Livewire\Backend\UserManagement\FormComponent\InvitationManagementModal::$invitation must not be accessed before initialization</p>
  </blockquote>
  <h3>Stripped-down, copy-pastable code snippets</h3>
  <ul>
  <li>Livewire\InvitationManagementModal.php</li>
  </ul>
  <pre><code>&lt;?php
  
  namespace App\Http\Livewire\Backend\UserManagement\FormComponent;
  
  use Livewire\Component;
  
  use Livewire\WithPagination;
  use App\Http\Livewire\Backend\DataTable\WithCachedRows;
  
  use App\Models\Invitation;
  
  class InvitationManagementModal extends Component
  {
      use WithPagination, WithCachedRows;
      
      public $showInvitationManagementModal = false;
      public Invitation $invitation;
  
      protected $listeners = ['manageInvitation'];
  
      public function manageInvitation()
      {
          $this-&gt;showInvitationManagementModal = true;
      }
  
      public function deleteInvitation(Invitation $invitation)
      {
          $this-&gt;invitation-&gt;delete();
      }
  
      public function getInvitationRowsProperty()
      {
          return $this-&gt;cache(function () {
              $invitations = Invitation::where('registered_at', null)-&gt;paginate(5);
              return $invitations;
          });
      }
  
      public function render()
      {
          return view('livewire.backend.user-management.form-component.invitation-management-modal', ['invitations' =&gt; $this-&gt;invitationRows]);
      }
  }
  </code></pre>
  <ul>
  <li>livewire\invitation-management-modal.blade.php</li>
  </ul>
  <pre><code>&lt;div&gt;
      &lt;x-modal.stacked wire:model.defer=&quot;showInvitationManagementModal&quot; id=&quot;scroll-lock&quot;&gt;
          &lt;x-slot name=&quot;title&quot;&gt;Manage Invitation&lt;/x-slot&gt;
          &lt;x-slot name=&quot;description&quot;&gt;Manage all the invitations which are yet to be accepted.&lt;/x-slot&gt;
          &lt;x-slot name=&quot;content&quot;&gt;
              &lt;div class=&quot;p-8 space-y-4&quot;&gt;
                  &lt;ul class=&quot;flex flex-col divide divide-y w-full bg-white rounded-lg shadow&quot;&gt;
                      @forelse($invitations as $key =&gt; $invitation)
                          &lt;li class=&quot;flex flex-row&quot;&gt;
                              &lt;div class=&quot;flex flex-1 items-center px-8 py-4&quot;&gt;
                                  &lt;div class=&quot;flex-1 mr-16&quot;&gt;
                                      &lt;div class=&quot;text-sm dark:text-white&quot;&gt;
                                          {{ $invitation-&gt;email }}
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                                  &lt;button wire:click=&quot;deleteInvitation&quot; class=&quot;text-right flex justify-end&quot;&gt;
                                      &lt;x-icon.trash /&gt;
                                  &lt;/button&gt;
                              &lt;/div&gt;
                          &lt;/li&gt;
                      @empty
                      @endforelse
                  &lt;/ul&gt;
                  &lt;div&gt;
                      {{ $invitations-&gt;links() }}
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/x-slot&gt;
          &lt;x-slot name=&quot;footer&quot;&gt;
              &lt;x-button.secondary wire:click.defer=&quot;$set('showInvitationManagementModal', false)&quot;&gt;Cancel&lt;/x-button.secondary&gt;
          &lt;/x-slot&gt;
      &lt;/x-modal.stacked&gt;
  &lt;/div&gt;
  </code></pre>
  <p><strong>Context</strong></p>
  <ul>
  <li>Livewire version: 2.3.5</li>
  <li>Laravel version: 8.20.1</li>
  <li>Alpine version: 2.8.0</li>
  <li>Browser: Chrome</li>
  </ul>