Skip to content

Commit

Permalink
Receive messages from the current message component
Browse files Browse the repository at this point in the history
  • Loading branch information
Raccoon254 committed May 19, 2024
1 parent c6a5073 commit b4110d9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/Livewire/DisplayChatMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@

namespace App\Livewire;

use App\Models\Message;
use Illuminate\View\View;
use Livewire\Component;

class DisplayChatMessage extends Component
{
public function render()
public Message $message;

public function mount(Message $message): void
{
$this->message = $message;
}

public function render(): View
{
return view('livewire.display-chat-message');
}
Expand Down

0 comments on commit b4110d9

Please sign in to comment.