refactored code to remove php shorthand tags and use blade instead