Super newbie here (sorry if this question leads to a head smacking moment). I have just started learning about Laravel (using a Windows operating system) and attempted to make a controller via command line and received a 'Fatal Error' message:
php artisan make:controller PagesController
[Symfony\Component\Debug\Exception\FatalErrorException]
syntax error, unexpected end of file.
Could someone please help me with this? Composer is up to date. Thanks!
You might want to delete all compiled Blade views in storage/framework/views and let Blade re-compile the views.
Check for any control structure (i.e. an 'if' or 'foreach') and see if you correctly ended the structure.
ie: @if with @endif or @foreach with @endforeach .
Hi
I encounter the same issue but still did not worked. I deleted all instances of @foreach (used in the previous presentation-laravel from scratch) but still the same error.... is there a need to refresh something?
@roadrunner89 I had the exact same problem in middle of one of my projects. After checking everything I figured out that I have missed a semi-colon (;) at one of my routes at routes.php file! Check that file.