Skip to content

Model::shouldBeStrict(true); #134

@ultrono

Description

@ultrono

Within my app service provider I'm calling:

Model::shouldBeStrict(! $this->app->isProduction());

I'm then calling a query as follows:

$place = Place::query()
    ->withDistance('location', new Point(1, 1, 4326))
    ->first();

In a HTTP resource I'm then accessing $this->distance.

I then get an exception (MissingAttributeException).

When I comment out shouldBeStrict, everything works fine. Is there any way around this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions