fix: invitation

This commit is contained in:
Andras Bacsai
2023-09-15 11:19:36 +02:00
parent 82c235d5af
commit b07cc500e7
19 changed files with 183 additions and 89 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Http\Livewire\Team;
use App\Models\User;
use Illuminate\Support\Facades\Cache;
use Livewire\Component;
class Member extends Component
@@ -24,6 +25,10 @@ class Member extends Component
public function remove()
{
$this->member->teams()->detach(currentTeam());
Cache::forget("team:{$this->member->id}");
Cache::remember('team:' . $this->member->id, 3600, function() {
return $this->member->teams()->first();
});
$this->emit('reloadWindow');
}
}