Thank you for all the help in the past. On my app, when i try to view a certain blade, it returns the error
"Trying to get property of non-object".
It has pointed me to the blade and the section of code where the error comes from:
<tbody>
<?php $__empty_1 = true; $__currentLoopData = $item->activation_pins; $__env->addLoop($__currentLoopData); $
<tr>
<td><?php echo e($loop->index + 1); ?></td>
<td><?php echo e($itm->pin); ?></td>
<td>
<span class="label label-<?php echo e($itm->is_active ? ( $itm->is_valid ? 'info' : 'danger' )$
<?php echo e($itm->is_active ? ( $itm->is_valid ? 'active' : 'expired' ) : 'inactive'); ?>
</span>
</td>
<td>
<?php echo e($itm->user_id ? $itm->user->email : '-'); ?>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<tr>
<td colspan="6">
<p class="text-center">No Activation Pins</p>
</td>
</tr>
<?php endif; ?>
</tbody>
```
With emphasis on:
<td>
<?php echo e($itm->user_id ? $itm->user->email : '-'); ?>
</td>
Could I be missing something? Thanks.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire