Laravel en boucle Vérification si le dernier enregistrement a atteint
$count = 0;
$len = count($array);
foreach ($array as $item) {
if ($count == 0) {
// first
} else if ($count == $len - 1) {
// last
}
// increment
$count++;
}
Smiling Starling