class RelationExistenceRule implements Rule

Report relationship queries and eager loads that name a relation the model does not define.

Constants

private LOADING_METHODS

private QUERY_METHODS

private MORPH_METHODS

Methods

__construct(ModelRuleHelper $modelRuleHelper, RelationExistenceHelper $relationExistenceHelper)

Create the rule.

string
getNodeType()

Get the node type the rule checks.

array
processNode(Node $node, Scope $scope)

Report the relations the call names that the model does not define.

Details

at line 74
__construct(ModelRuleHelper $modelRuleHelper, RelationExistenceHelper $relationExistenceHelper)

Create the rule.

Parameters

ModelRuleHelper $modelRuleHelper
RelationExistenceHelper $relationExistenceHelper

at line 83
string getNodeType()

Get the node type the rule checks.

Return Value

string

at line 94
array processNode(Node $node, Scope $scope)

Report the relations the call names that the model does not define.

Parameters

Node $node
Scope $scope

Return Value

array