I added a custom attribute to my model
public function getTouchedAttribute() { ...
I would like to add this to the request
hasMany()->where('touched', ...)
but obviously this is not a column in the table.
What is the most elegant way to achieve this behavior?
eloquent laravel
NiRR
source share