Not able to create controller with command line?

Published 4 months ago by nitinjohnson

I have got the setup of latest laravel from my client but when i try to create new controller its showing the below error. I am already using the latest wamp server 3 which has PHP 7.2.4 .Please help me solve this.

Parse error: syntax error, unexpected '?' in C:\wamp\www\elatetech\celebrity\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php on line 233

tykus
tykus
4 months ago (692,420 XP)

Your CLI version of PHP is not > 7; if you check

$ php -v

you probably will see version 5.6 or below

nitinjohnson

How to upgrade the cli version can you please suggest

tykus
tykus
4 months ago (692,420 XP)

¯\_(ツ)_/¯

No idea! I don't use Windows

topvillas

Change your path to point to the version of PHP you want.

nitinjohnson

ok i just figured out i was directly setting up the composer installation checking on the developer option allow me to select the other php versions available.

Please sign in or create an account to participate in this conversation.