Skip to content

Commit

Permalink
Added removeFromAllChannels method to the Channelable trait
Browse files Browse the repository at this point in the history
  • Loading branch information
fulopattila122 committed Sep 8, 2023
1 parent 4241015 commit b8fbd5e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Channel/Traits/Channelable.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@ public function assignChannels(array|Model|Collection $channels): void
{
$this->channels()->sync($channels);
}

public function removeFromAllChannels(): void
{
$this->channels()->detach();
}
}

0 comments on commit b8fbd5e

Please sign in to comment.