lasthourcloud/app/Http/Livewire/Team/Member.php
Andras Bacsai 127d42d873 updates
2023-06-08 11:43:14 +02:00

18 lines
359 B
PHP

<?php
namespace App\Http\Livewire\Team;
use App\Models\User;
use Livewire\Component;
class Member extends Component
{
public User $member;
public function remove()
{
$this->member->teams()->detach(session('currentTeam'));
session(['currentTeam' => session('currentTeam')->fresh()]);
$this->emit('reloadWindow');
}
}