protected function affectedRows($relation, $foreignKey, $foreignKeyIds)
    {
        $relationModel = $relation->getQuery()->getModel();
        $relationModel = new $relationModel();

        return $relationModel->withTrashed()->whereIn($foreignKey, $foreignKeyIds)->count();
    }
protected function affectedRows($relation, $foreignKey, $foreignKeyIds)
    {
        $relationModel = $relation->getQuery()->getModel();
        $relationModel = new $relationModel();

        return $relationModel->withTrashed()->whereIn($foreignKey, $foreignKeyIds)->count();
    }
protected function affectedRows ( $ relation , $ foreignKey , $ foreignKeyIds ) { $ relationModel = $ relation -> getQuery ( ) -> getModel ( ) ; $ relationModel = new $ relationModel ( ) ; return $ relationModel -> withTrashed ( ) -> whereIn ( $ foreignKey , $ foreignKeyIds ) -> count ( ) ; }
Affected rows if we do execute.

@param Illuminate\Database\Eloquent\Relations\Relation $relation
@param string                                          $foreignKey
@param array                                           $foreignKeyIds

@return void
Affected rows if we do execute .