Creates a relationship binding between this model and another.
public static bind ( string $type, string $name, array $config = [] ) : object | ||
$type | string | The type of relationship to create. Must be one of `'hasOne'`, `'hasMany'` or `'belongsTo'`. |
$name | string | The name of the relationship. If this is also the name of the model, the model must be in the same namespace as this model. Otherwise, the fully-namespaced path to the model class must be specified in `$config`. |
$config | array | Any other configuration that should be specified in the relationship. See the `Relationship` class for more information. |
return | object | Returns an instance of the `Relationship` class that defines the connection. |