You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add 2 function protected function isCloseByAdmin(): BooleanDateAttribute { return BooleanDateAttribute::for('close_by_admin_at'); }
And then another function
protected function isCloseByPic(): BooleanDateAttribute { return BooleanDateAttribute::for('close_by_pic_at'); }
Additional info
and then run some API that use this Model "message": "Call to undefined method App\\Models\\ProjectJob::getIsCloseByAdminAttribute()", "exception": "BadMethodCallException",
The text was updated successfully, but these errors were encountered:
Can you set up a new project using Laravel 10 with the code that fails and share the repo? I tried it locally and in the tests as best as I could with the information, but couldn't reproduce it. I also don't see any errors in your snippets so based on that information it should work though.
Steps to reproduce
in my model adding 2 attribute
protected $appends = [ 'is_close_by_admin', 'is_close_by_pic', ];
protected $casts = [ 'close_by_admin_at' => 'datetime', 'close_by_pic_at' => 'datetime', ];
add 2 function
protected function isCloseByAdmin(): BooleanDateAttribute { return BooleanDateAttribute::for('close_by_admin_at'); }
And then another function
protected function isCloseByPic(): BooleanDateAttribute { return BooleanDateAttribute::for('close_by_pic_at'); }
Additional info
and then run some API that use this Model
"message": "Call to undefined method App\\Models\\ProjectJob::getIsCloseByAdminAttribute()", "exception": "BadMethodCallException",
The text was updated successfully, but these errors were encountered: