Namespace declaration statement has to be the very first statement in the script (Laravel 5.2.5)

Posted 3 years ago by labanino

Getting this error in tinker:

labanino:~/workspace/blog $ php artisan tinker
Psy Shell v0.6.1 (PHP 5.5.9-1ubuntu4.13 — cli) by Justin Hileman
>>> $blog = App\Blog::create(['title' => 'Hello everyone', 'body' => 'I am having a lot of fun']);     

[Symfony\Component\Debug\Exception\FatalErrorException]                           
  Namespace declaration statement has to be the very first statement in the script 

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.