0

To make it simple,

I installed laravel on my xampp folder in desktop, once done I've accessed it on my localhost which is working. After that I manually transferred the folder of laravel itself to the domain.

When I tried to access the laravel in my domain, I encountered an error.

enter image description here

I've checked the file,

enter image description here

There's no problem, but I'm experiencing an error. Any solution for this?

1 Answer 1

1

The support for use [] for array started with PHP 5.4. Use array() instead and your problem should go away.

You can check your PHP version by running echo phpversion().

Sign up to request clarification or add additional context in comments.

3 Comments

kousha, replacing it with array() won't work as Laravel needs PHP >= 5.4 to work. It would be a tedious work make Laravel work on PHP versions < 5.4.
The problem at hand here is not getting Laravel to work, but rather the problem with PHP not recognizing the [] notation for array()
Well, could be both if you read the issue title. I think you could add a small clarification to your answer.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.