Hi @hcphoon01
I suggest you that please check your homestead env,
if you share your code and file it would be great, meanwhile check your file extension it should be .php
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a laravel/homestead box that is running my laravel app and for some reason when a request is submitted to a php file that is part of a non laravel based api I get this error Uncaught SyntaxError: Unexpected token '<'. This error corresponds to the first line of the php file in question where it opens the file <?php.
I am working on this project with another developer and he does not get this error and he is using a global homestead installation rather than my 'per-project' installation.
I assume this has something to do with my environment but I am not sure what.
Please or to participate in this conversation.