Files
timebank-cc-public/app/Http/Livewire/Calls/SendMessageButton.php
Ronald Huynen 2547717edb Initial commit
2026-03-23 21:37:59 +01:00

34 lines
694 B
PHP

<?php
namespace App\Http\Livewire\Calls;
use Livewire\Component;
class SendMessageButton extends Component
{
public $callable;
public $call;
public function mount($callable, $call)
{
$this->callable = $callable;
$this->call = $call;
}
public function createConversation()
{
if (!$this->callable || $this->callable->isRemoved()) {
return;
}
$conversation = getActiveProfile()->createConversationWith($this->callable);
return redirect()->route('chat', ['conversation' => $conversation->id]);
}
public function render()
{
return view('livewire.calls.send-message-button');
}
}