84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
I have a few questions:
1 Shouldn’t $user, the automatically loaded construct, be empty?
is to call $this->user->name in the hello method, so what you get is also empty.
Why is it written like this?
The parameter of the constructor method is required to be a userModel object. If this object has the attribute name, it can be $this->user->name.
An error will be reported. In the construction method, did you pass user in the new object (did you pass it in)?
The parameter of the constructor method is required to be a userModel object. If this object has the attribute name, it can be $this->user->name.
An error will be reported. In the construction method, did you pass user in the new object (did you pass it in)?