search

Home  >  Q&A  >  body text

laravel - Confused about php syntax?


As shown in the figure: method => function. what does this mean?


Additional: Thank you everyone, my brain is rusty. . .

三叔三叔2724 days ago809

reply all(5)I'll reply

  • 高洛峰

    高洛峰2017-06-16 09:20:55

    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

    reply
    0
  • 漂亮男人

    漂亮男人2017-06-16 09:20:55

    $this->username() returns the key name
    trans returns the key value

    reply
    0
  • 为情所困

    为情所困2017-06-16 09:20:55

    Define array. . .
    key is $this->username, value is trans('auth.failed')

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-06-16 09:20:55

    Use the return value of the method $this->username() as the key

    reply
    0
  • 为情所困

    为情所困2017-06-16 09:20:55

    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)]

    reply
    0
  • Cancelreply