protected function hasInvalidCascadingRelationships()
    {
        return array_filter($this->getCascadingDeletes(), function ($relationship) {
            return ! method_exists($this, $relationship) || ! $this->{$relationship}() instanceof Relation;
        });
    }
protected function hasInvalidCascadingRelationships()
    {
        return array_filter($this->getCascadingDeletes(), function ($relationship) {
            return ! method_exists($this, $relationship) || ! $this->{$relationship}() instanceof Relation;
        });
    }
protected function hasInvalidCascadingRelationships ( ) { return array_filter ( $ this -> getCascadingDeletes ( ) , function ( $ relationship ) { return ! method_exists ( $ this , $ relationship ) || ! $ this -> { $ relationship } ( ) instanceof Relation ; } ) ; }
Determine if the current model has any invalid cascading relationships defined.

A relationship is considered invalid when the method does not exist, or the relationship
method does not return an instance of Illuminate\Database\Eloquent\Relations\Relation.

@return array
Determine if the current model has any invalid cascading relationships defined .