I have the following foreach
in Laravel.
@foreach($values as $value)
<li>{{ $value }}</li>
@endforeach
I would like to add some special information when it comes to the first item in the loop.
In some other template engines, there is usually a specific method to know which is the first or last item in the loop.
For example, Twig:
{% for (value in values) %}
<li>{% if loop.first %}Primeiro - {% endif %}{{ value }}</li>
{% endfor %}
Is there any way to do this in Laravel?