Error when acessing an Attribute from another Attribute #52263
Unanswered
caiokawasaki
asked this question in
Q&A
Replies: 2 comments
-
Hello, I don't think that you can access it What about the following code : // using magic attribute
return Storage::publicUrl($this->path);
// using getAttribute() method
return Storage::publicUrl($this->getAttribute('path')); |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can access with `$this->url. Closures are usually bound to the object they are defined in... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Laravel Version
11.17.0
PHP Version
8.3
Database Driver & Version
mysql/mysql-server:8.0 on Docker
Description
When I try to access an Attribute within another Attribute I receive the following error:
Undefined array key "path"
Is this an expected behavior?
Here is my
File
model:Steps To Reproduce
I'm just returning the Attribute in a resource:
Beta Was this translation helpful? Give feedback.
All reactions