Replies: 1 comment 2 replies
-
You're the first one reporting this, probably because using a Laravel app without a DB isn't a very common scenario. Feel free to send us PR. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there 👋
I've started a new Laravel API project that is just calling third party APIs in the background but is not using a database at all.
So I've deleted the
config/database.php
file and removed theDatabaseServiceProvider
. This works as expected and I can use my API, but as soon I install Ray, the project breaks (Target class [db] does not exist.
) at every request as Ray needs the DB facade.As far as I can trace this problem I noticed that the check if query config options are enabled is inside the
DB::listen
callback (for example https://github.com/spatie/laravel-ray/blob/main/src/Watchers/DuplicateQueryWatcher.php#L24).Is there a certain reason that this check is not before the actual
DB::listen
?Of course I could create a PR for that, but I wanted to ask beforehand as I suspect that you had your reasons for implementing it that way.
Cheers and keep up your excellent work 🙂
Beta Was this translation helpful? Give feedback.
All reactions