Parser error in Laravel 5.5



  • In my view, welcome.blade.php I am getting a parser error in the following HTML excerpt:

    <div class="single_service_left">
        <img src="{{ asset('images/flaticon4.png') }}" alt="" />
    </div>
    

    Until then it seems perfectly normal, but the following error is presented:

    Parse error: syntax error, unexpected '')); ?> alt=" />' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ')'

    And debugger points to the line that would be "paired" as follows;

    <div class="single_service_left">
        <img src="<?php echo e(asset('images/flaticon4.png')); ?>" alt="" />
    </div>
    

    The PHP version I'm using is the 7.1



  • I found the problem; the same was generated by a syntax error that came from another imported component within the html in question.

    As the laravel compiled everything in a single file it seemed that the error was of the file "X" but actually it was of a @include from another html.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2