You can access $post
inside your Livewire view directly as it is a public property.
As example you can output the id of your $post
, given that there is an id
property on your $post
, like this:
<div>
<x-slot name="sidebar">
<div class="bg-gray-100">
Some text... Some inputs...
</div>
</x-slot>
Post id: {{ $post->id }}
<div class="p-5">
<livewire:other-component />
</div>
</div>
How to access properties is written down in the Livewire docs
Access properties across components, can be done by utilizing Livewire Events
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…