src/Repositories/Repository.php
public function detach($idParent, $idChild, $relation)
    {
        $parent = $this->find($idParent);
        
        $parent->$relation()->detach($idChild);
        
        return true;
    }
public function detach($idParent, $idChild, $relation)
    {
        $parent = $this->find($idParent);
        
        $parent->$relation()->detach($idChild);
        
        return true;
    }
Detach relation

@return \Illuminate\Database\Eloquent\Model;