I would imagine you could include it in the templates but that wouldn't be semantically correct would it? Also what's the point of having a long @if/@elseif statement in your blade? Kind of seems like overkill to me.
Maybe including a variable in your route/controller that holds the link tag to the script you want to run and pass that through to the view with the rest of your data? That almost seems like the best way to do it or does it? What are your thoughts?
What are your theories and why?