2

The master.blade.php's file contains:

@section('content')
  @foreach($admons as $admon)
    <p>{{ $admons->admon }}</p>
  @foreach
@stop

and it is throwing me the error:

Symfony \ Component \ Debug \ Exception \ FatalErrorException
syntax error, unexpected end of file

C:\AppServ\www\Viniza\app\storage\views\b48f03c3d0a952af7b5dd24750898f94

 $(document).ready(function() {
$('ul.sf-menu').sooperfish();
$('.top').click(function() {$('html, body').animate({scrollTop:0}, 'fast'); return false;});
});
</script>
</body>
</html>

the full content of master.blade.php's file is:

{{ HTML::style('css/style.css') }}
{{ HTML::script('js/jquery.js') }}

@section('content')
  @foreach($admons as $admon)
    <p>{{ $admons->admon }}</p>
  @foreach
@stop

<!DOCTYPE HTML>
<html>

<head>
  <title>Viniza Konw</title>
  <meta name="keywords" content="coffee buy shop" />
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
</head>

<body>
  <div id="main">
    <header>
      <div id="logo">
        <div id="logo_text">
          <h1><a href="index.html">Coffe<span class="logo_colour">JuanValdez</span></a></h1>
        </div>
      </div>
      <nav>
        <div id="menu_container">
          <ul class="sf-menu" id="nav">
            <li><a href="#">Home</a></li>
          </ul>
        </div>
      </nav>
    </header>

    <div id="site_content">
      <div class="content">
        <h1></h1>

        <div class="header_image">
          {{ HTML::image('images/header_image.jpg', "Imagen no encontrada", 
            array('id' => 'center', 'title' => 'center')) }}
        </div>

        <div class="border_top"></div>
        <div class="border_bottom"></div>          

      </div>      
    </div>
    <div id="scroll">
      <a title="Scroll to the top" class="top" href="#"><img src="images/top.png" alt="top" /></a>
    </div>
    <footer>
      <p><img src="images/twitter.png" alt="twitter" />&nbsp;
         <img src="images/facebook.png" alt="facebook" />&nbsp;
         <img src="images/rss.png" alt="rss" />           </p>
      <p>Copyright &copy; CSS3_winter_scene | <a href="http://www.css3templates.co.uk">design from css3templates.co.uk</a></p>
    </footer>
  </div>
  <!-- javascript at the bottom for fast page loading -->
  <script type="text/javascript" src="js/jquery.js"></script>
  <script type="text/javascript" src="js/jquery.easing-sooper.js"></script>
  <script type="text/javascript" src="js/jquery.sooperfish.js"></script>
  <script type="text/javascript">
    $(document).ready(function() {
      $('ul.sf-menu').sooperfish();
      $('.top').click(function() {$('html, body').animate({scrollTop:0}, 'fast'); return false;});
    });
  </script>
</body>
</html>

3 Answers 3

4

This error in Symphony is usually telling you that you didn't 'end' a control structure (i.e. an 'if' or 'foreach').

You have a couple typos, where you are ending your foreach with "@foreach" it should be "@endforeach".

That should do it for you.

Sign up to request clarification or add additional context in comments.

Comments

1

In my case, it was the silliest mistake. I missed out a ; while creating a route with a closure function.

So, if you've not made any mistakes as pointed out by above 2 answers, look for any syntax error in your routes\web.php (Laravel 5.3+)

Comments

0

I just ran into the same error and it was due to a GIT conflict. So if the first answer doesn't fix the problem, look for "<<< HEAD" in your code

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.