I was following along with Jeffrey Ways laracasts on his website and was really learning but unfortunately I made an error somewhere and I don't know where that is. I am receiving the following error.
https://laracasts.com/series/laravel-from-scratch
Symfony \ Component \ Debug \ Exception \ FatalErrorException
syntax error, unexpected '__data' (T_STRING)
<?php $__env->startSection('content'); ?>
<h1>All Users</h1>
<?php foreach($users as $user): ?>
<li><?php echo link_to("/users/{$user->username}", $user->username); ?></li>
<?php endforeach; ?>;
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.default, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
I'm not quite sure why I am getting this issue. Can someone explain it to me please so I can understand?
I think you missed a single quote on the last line. Try this:
<?php $__env->startSection('content'); ?>
<h1>All Users</h1>
<?php foreach($users as $user): ?>
<li><?php echo link_to("/users/{$user->username}", $user->username); ?></li>
<?php endforeach; ?>;
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.default', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With