Vinelab / NeoEloquent

The Neo4j OGM for Laravel
MIT License
633 stars 197 forks source link

BadMethodCallException: undefined method Builder::getArrayableAttributes() #261

Closed DeltaBravo closed 3 years ago

DeltaBravo commented 6 years ago

BadMethodCallException Call to undefined method Vinelab\NeoEloquent\Query\Builder::getArrayableAttributes()

https://laravel.com/api/5.5/Illuminate/Database/Eloquent/Concerns/HasAttributes.html#method_getArrayableAttributes

laravel/framework v5.5.25 vinelab/neoeloquent v1.4.4

Worked with Laravel 5.3 and NeoEloquent 1.4.3 iirc.

Mulkave commented 6 years ago

Can you please open a Pull Request with your fix?

DeltaBravo commented 6 years ago

I do not have a fix. My workaround was to use getAttributes() instead as it met my needs but it is not a drop-in replacement.

The issue is really that none of the 'HasAttributes' trait methods are available because ::find() is not returning a model but instead a Builder object.

This is all just a bit over my head so I cannot help beyond reporting and answering questions.

Mulkave commented 6 years ago

@DeltaBravo cool, thanks for reporting!

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.