laravel 5 installation php artisan parse error expecting identifier (T_STRING)

1.5k views Asked by At

Why every time when I install Laravel 5, after typing the command

laravel new project-name    

usually I get the issue

Crafting application...

Parse error: parse error, expecting `"identifier (T_STRING)"' or `"variable (T_VARIABLE)"' or `'{'' or `'$'' in /Applications/MAMP/htdocs/test/artisan on line 31
Script php artisan clear-compiled handling the post-install-cmd event returned with an error



  [RuntimeException]  
  Error Output:       



run-script [--dev] [--no-dev] [-l|--list] [script] [args1] ... [argsN] 

Then when I'm trying to the command php -S localhost:8888 -t public to open the sever and open it in the browser I always see this issue on my home page

Parse error: parse error, expecting `"identifier (T_STRING)"' or `"variable (T_VARIABLE)"' or `'{'' or `'$'' in /Applications/MAMP/htdocs/test/public/index.php on line 50

how I can fixed it?

0

There are 0 answers