As shown in the figure: method => function. what does this mean?
=>
Additional: Thank you everyone, my brain is rusty. . .
First of all, this is an array, and the key value of the array is the data calculated by these two functions
This is just a way to save trouble, no need to make a fuss
$this->username() returns the key nametrans returns the key value
Define array. . . key is $this->username, value is trans('auth.failed')
Use the return value of the method $this->username() as the key
This is the assignment format in the PHP array, => the key in front and the value in the back. In this way, the errors array looks like this [username,trans(PalaPala)]
[username,trans(PalaPala)]
First of all, this is an array, and the key value of the array is the data calculated by these two functions
This is just a way to save trouble, no need to make a fuss
$this->username() returns the key name
trans returns the key value
Define array. . .
key is $this->username, value is trans('auth.failed')
Use the return value of the method $this->username() as the key
This is the assignment format in the PHP array, => the key in front and the value in the back. In this way, the errors array looks like this
[username,trans(PalaPala)]