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?