Laravel 5 php artisan parse error setting pending id (T_STRING)

Why every time I install Laravel 5 after entering the command

laravel new project-name    

      

usually i get the problem

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 try to execute a command php -S localhost:8888 -t public

to open a terminal and open it in a 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 can i fix it?

+3


source to share





All Articles