Replies: 1 comment
-
Pls see this https://stackoverflow.com/a/71435433 |
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
-
I don't understand why I constantly receive the "Unresolvable dependency resolving [Parameter #0 [ string $mime ]] in class" error with my Blade component classes, especially when it is a primitive value.
In the current case, I have a component we will call Widget. I call it in another component as such:
<x-widget :mime="$mimeinput" />
Now, mime is definitely a string, because 1) it is in quotes and 2) I know I set $mimeinput to a string in its class.
My Widget class constructor is as follows:
public function __construct(string $mime)
And I get the above error. I don't understand why I keep getting this error in this situation. I have researched it every time and never found an answer. The error means the container cannot tell what value to put in there, and the only solution I have seen is to set a default value, which merely makes the parameter NOT required and sidesteps the issue. What am I doing wrong?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions