class ModelPropertyExtension implements PropertiesClassReflectionExtension

internal  
 

Methods

__construct(ModelPropertyHelper $modelPropertyHelper, ModelRelationsExtension $modelRelationsExtension)

Create a new model property extension instance.

bool
hasProperty(ClassReflection $classReflection, string $propertyName)

Determine whether the model has a database property, unless an accessor or mutator handles it.

PropertyReflection
getProperty(ClassReflection $classReflection, string $propertyName)

Get the database property.

Details

at line 19
__construct(ModelPropertyHelper $modelPropertyHelper, ModelRelationsExtension $modelRelationsExtension)

Create a new model property extension instance.

Parameters

ModelPropertyHelper $modelPropertyHelper
ModelRelationsExtension $modelRelationsExtension

at line 33
bool hasProperty(ClassReflection $classReflection, string $propertyName)

Determine whether the model has a database property, unless an accessor or mutator handles it.

A property the schema facts cannot establish is left to a declared relation, which Eloquent reads when no attribute has that name. An abstract model claims no such property: a model trait's @mixin Model, as on Scout's Searchable, would otherwise give every model every property. ModelPropertyHelper::acceptsPropertyName() accepts any name for an abstract model instead.

Parameters

ClassReflection $classReflection
string $propertyName

Return Value

bool

at line 50
PropertyReflection getProperty(ClassReflection $classReflection, string $propertyName)

Get the database property.

Parameters

ClassReflection $classReflection
string $propertyName

Return Value

PropertyReflection