PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, February 3, 2022

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

 February 03, 2022     laravel, laravel-5, php     No comments   

Issue

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

The error is:

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

my Model

 <?php
 
namespace App\Models;

The version of my Laravel is 5.5.


Solution

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

<?php

namespace App\Models;


Answered By - Gayan
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing