spatie / laravel-dashboard

A beautiful dashboard for Laravel

Home Page:https://docs.spatie.be/laravel-dashboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)

DylanDec opened this issue · comments

commented

I made it locally, this worked perfectly. When I deployed my application with the dashboard to production I got this error.

syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)

You are not running the required PHP version.

commented

I am running php version 7.4.6. The docs say you need 7.4+.

commented

image

Our test prove that the package doesn’t have a syntax issue.

If you think the package is in error, please PR a failing test.

I assume your webserver is using a different (older) PHP version that the version used by your CLI.

I got the same issue , how did you solve it please ?

open your projet in cmd and then insert this command echo 7.4>php-version , that because you use a php version 7.4.6 and your server run anather version

You are not running the required PHP version.

Update PHP Version to resolve this issue

Hey I am working on a legacy project and I need help. It only works on php 7.1 but according to above thread I need to use 7.4 can anybody help me with this?
my stack is
Zend framework 3.0
Node 8
php 7.1
And metronic theme 4.6