inyansuta
2 years ago

How delete all "throug" relations without foreach?

Posted 2 years ago by inyansuta

How can I delete all the goals in the tournament, where tournament has more matches and each of the matches may have more goals? Without foreach during matches... Something like this:

$tournament->matches()->goals()->delete();

Please sign in or create an account to participate in this conversation.