@Mick79 hehe yeah it probably don't like it. Personally I would look into moving it out of the view as well (or at least inside a helper directive or similar)
@Sinnbeck I'd like to do that too. I hate using @php inside blades. To me it's an indicator that you're not doing things right. In this instance I can't see any other way.
@Sinnbeck You might be going above my pay grade there...
The reason I'm doing it as I am is because I'm taking data that's being captured in the browser by user interactions. I still don't know if that means I can't do it the way you've suggested haha.
btw I was browsing around for solutions this morning and stumbled upon your blog. Very cool. Bookmarked.