I have a list of subjects in an array. I want to print this array in blade file but I want to separate each item of the array by comma. But I don't want the comma end of the last element of the array. Let me know which one is the best approach?
If your intention is to show comma after each element except the last one, you can easily use $loop->last() inside your foreach. I think it will help to fix your issue.