lasthourcloud/app/Http/Livewire/Team/Invitations.php
Andras Bacsai a97d22b81b updates
2023-06-12 12:00:01 +02:00

22 lines
529 B
PHP

<?php
namespace App\Http\Livewire\Team;
use App\Models\TeamInvitation;
use Livewire\Component;
class Invitations extends Component
{
public $invitations;
protected $listeners = ['refreshInvitations'];
public function refreshInvitations()
{
$this->invitations = TeamInvitation::whereTeamId(auth()->user()->currentTeam()->id)->get();
}
public function deleteInvitation(int $invitation_id)
{
TeamInvitation::find($invitation_id)->delete();
$this->refreshInvitations();
}
}