Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

aswal94's avatar

'q' is displayed on every page

I am getting a character 'q' on every page at the beginning of every page.

I have checked web.php, Model (Post.php), View, Controller (Post Controller), migration, public/index.php and it is not found anywhere but still when i run the app 'q' is displayed at the beginnnig.

I have even tried

Route::get('/', function(){ return "Hello"; });

The output is qHello

How to resolve it.

0 likes
7 replies
Nakov's avatar

Do you have a middleware that runs after the response is received and it prepends 'q' to it. Make sure you do a search on your app directory using your IDE or text editor, and look for 'q' :)

aswal94's avatar

I have checked the middleware but nothing there.

Sinnbeck's avatar

Create a new project and copy the app folder over. Does it happen there? If not copy the next folder and the next and so on.

1 like
hondnl's avatar

Check your bootstrap/app , your serviceproviders and your config files.

aswal94's avatar

@hondnl I have gone through the files i havent find 'q' there...Also what should i look for...a print statement....

Additionally, 'q' is also shown on the console when i write php artisan serve

qLaravel development server started: http://127.0.0.1:8000

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

And it didnt work creating a new project, testing it with php artisan serve, and then copying each main folder over one by one (with a quick test in between each)? Shouldnt take long to test

My best bet is that you have a q just before <?php in some file. I just recreated it by adding one in my web.php

q<?php

Please or to participate in this conversation.