Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] whereDate queries not being displayed #360

Open
4 of 12 tasks
vicenterusso opened this issue Jan 19, 2025 · 5 comments
Open
4 of 12 tasks

[BUG] whereDate queries not being displayed #360

vicenterusso opened this issue Jan 19, 2025 · 5 comments

Comments

@vicenterusso
Copy link

Information

Have you searched through other issues to see if your problem is already reported or has been fixed?

  • Yes - I did not find it.
  • No

Did you read the documentation?

  • Yes - I did not find it.
  • No

Have you tried to reconfigure LaraDumps?

To configure LaraDumps, run: php artisan ds:init.

  • Yes - I didn't work.
  • No, I believe this error is not related the configuration.

Software Version

You can run composer show -i and npm list to list installed package with their versions.

Software Version (exactly)
LaraDumps App 3.8.0
LaraDumps package 3.5.1
Laravel 11.38.2
Operating System Linux Fedora

What is your project Environment?

  • Laravel Valet
  • Laravel Sail
  • Docker
  • XAMPP
  • Laragon
  • Other - please specify: ________

Describe the bug

What happened?

All queries are displayed, except for whereDate

Steps to Reproduce the problem

Just query any eloquent model with whereDate ahd check Laradumps. The request is there, the controller and the line, but the query itself is not

Extra information

ds()->queriesOn();
$bonus_vencimento_hoje = Bonus::whereDate('expires_at', $hoje)->count();
$bonus_vencimento_amanha = Bonus::where('expires_at', $amanha)->count();
ds()->queriesOff();

Screenshots

Image

@dansysanalyst
Copy link
Contributor

Hi Vicente,

I am on Laravel v11.39.1, and I could not replicate the problem. Both queries appear on the app.

Would you consider upgrading your Laravel version as test?

        ds()->queriesOn();
            User::whereDate('email_verified_at', now())->count();
            User::where('email_verified_at', now()->addDay())->count();
        ds()->queriesOff();

Image

@vicenterusso
Copy link
Author

@dansysanalyst maybe unrelated, but what is your database? Mine is Postgres

@dansysanalyst
Copy link
Contributor

✅ Confirmed issue in PGSQL.

I had it tested with MySQL and SQLite

@dansysanalyst
Copy link
Contributor

@luanfreitasdev: This seems to be an issue with the "prettify" and the double colon in the app "email_verified_at"::date.

"select count(*) as aggregate from "users" where "email_verified_at"::date = '2012-01-01'"

@vicenterusso could you please verify if the query shows up when you toggle off the prettify.

I get:

Image

Thanks :)

@vicenterusso
Copy link
Author

@vicenterusso could you please verify if the query shows up when you toggle off the prettify.

Yes, confirmed. Shows up when toggle is off. Any chance to fix it?

@luanfreitasdev luanfreitasdev transferred this issue from laradumps/laradumps Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants