L
L
Lolut2017-09-08 22:38:25
JavaScript
Lolut, 2017-09-08 22:38:25

Are arrays -constants a myth in php?

A little puzzled now, maybe I misunderstood something.
For some reason, when I decided to enter this code from the
a59f8091551842f6ae1bb152e294c724.png
Parse tutorial error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ']'

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Spirin, 2019-05-21
@VIGF

handleMail(postData) {
  return axios({
    method: 'post',
    url: '/auth/signin',
    data: postData,
  });
}

const handleSubmit = async e => {
  // some code
  try {
    const { data } = await auth.handleMail(postData);
    console.log('success', data);
  } catch (e) {
    console.log('error', e);
  }
};

A
Andrey Pavlenko, 2017-09-08
@Akdmeh

Sorry, I made a mistake, I corrected the answer.
Yes, it works since version 7.0, you just have a typo in your code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question