Laravel 5 - Php artisan syntax error

gabahulk picture gabahulk · Aug 31, 2015 · Viewed 60.7k times · Source

I am currently developing an app with Laravel 5 and suddenly the artisan stoped working!

I can't use a single command on it, it always return the error:

      [Symfony\Component\Debug\Exception\FatalErrorException]
      syntax error, unexpected ',', expecting variable (T_VARIABLE)

I tried to update via composer but when the artisan tries to clear-complie

Command: composer update

> php artisan clear-compiled

  [Symfony\Component\Debug\Exception\FatalErrorException]
  syntax error, unexpected ',', expecting variable (T_VARIABLE)

Has anyone ever had this error before?

My Php version is 5.6.8

Answer

gabahulk picture gabahulk · Aug 31, 2015

I've found the error!

I had a syntax error on my routes.php file...

function($id,**name**,**value**)

Forgot the $ sign and thus it found a unexpected ','.

Thank you all for the help!