After I pull my project in git, I get this error. It’s my 1st time to encounter this error.
The error is:
JavaScript
x
Namespace declaration statement has to be the very first statement or after any declare call in the script.
my Model
JavaScript
<?php
namespace AppModels;
The version of my Laravel is 5.5.
Advertisement
Answer
There is an empty space before the <?php
tag. Remove it.
JavaScript
<?php
namespace AppModels;