kirkbushell / eloquence

A drop-in library for certain database functionality in Laravel, that allows for extra features that may never make it into the main project.
MIT License
537 stars 60 forks source link

setAttribute from CamelCasing trait changes contract #85

Closed ftcvlad closed 3 years ago

ftcvlad commented 3 years ago

As seen here setAttribute in Laravel implementation returns a model.

As seen here setAttribute in CamelCasing trait does not return anything.

So, if you happen to use CamelCasing and, for example, end up there --> crash. setAttribute of CamelCasing jumps in between and does not pass model to the caller.

Suppose easy fix is making setAttribute from CamelCasing return whatever call to parent returns, see the PR