Skip to content
Advertisement

laravel error : Namespace declaration statement has to be the very first statement or after any declare call in the script

After I pull my project in git, I get this error. It’s my 1st time to encounter this error.

The error is:

JavaScript

my Model

JavaScript

The version of my Laravel is 5.5.

Advertisement

Answer

There is an empty space before the <?php tag. Remove it.

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement