Laravel – syntax error, unexpected end of file


I have a website which works fine on host, but I’m currently trying to install it on localhost.

I’ve downloaded everything and configured to work on localhost – Database & URL.

The problem is this error:

Unhandled Exception


syntax error, unexpected end of file Location:

C:\Program Files (x86)\EasyPHP-12.1\www\laravel\view.php(386) :
eval()’d code on line 118

And I don’t know what causes it. Any solutions?

P.S. I’ve setup in my windows’ host file


There is an error within one of your views. If there is a more detailed stack trace it should show you details of a view, although the name will be an md5() string so it’s a bit hard to find. You might want to delete all compiled Blade views in storage/views and let Blade re-compile the views.

If you still get the error then check your views to make sure you have all the proper closing tags, e.g., @endif or @endforeach

Always double check your views for any syntax errors.

Answered By – Jason Lewis

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published