Laravel Request Get Query Javascript Function Syntax