Skip to content

Conversation

@WINBIGFOX
Copy link

Added laravel/nightwatch dependency to composer.json and implemented environment variable and server startup logic for Nightwatch integration. Updated API routes to include Nightwatch middleware for enhanced functionality.

Added `laravel/nightwatch` dependency to composer.json and implemented environment variable and server startup logic for Nightwatch integration. Updated API routes to include Nightwatch middleware for enhanced functionality.
@gwleuverink
Copy link
Collaborator

Hey @WINBIGFOX Thanks for your contribution! You are on a roll!
Truly appreciate your efforts, also on your other PR's 🙏🏻

I like it! How do you feel about not requiring the package by default. We could even check if the Nightwatch service provider exists to see if it's installed before starting the worker.

This way we make it opt-in. It won't matter much (nightwatch is 1.4mb unzipped) but I like the idea.

@simonhamp what's your take on this?

@gwleuverink gwleuverink added the enhancement New feature or request label Jan 7, 2026
@gwleuverink
Copy link
Collaborator

Another thing just struck me. How does Nightwatch handle it when multiple clients post to the same project?

Not sure if Nightwatch will handle that gracefully. Have you tried using it on multiple devices?

…chNever

Removed `laravel/nightwatch` dependency and introduced `OptionalNightwatchNever` middleware to conditionally handle Nightwatch functionality. Updated API routes and server logic to reflect middleware replacement and improve compatibility.
@WINBIGFOX
Copy link
Author

Hi @gwleuverink, thanks a lot for your feedback!
I tweaked the code a bit more and made laravel/nightwatch optional again. It now checks whether Laravel Nightwatch is installed, and only then starts the agent.

Regarding your note about multiple clients: in my experience, Laravel Nightwatch doesn’t have any issues when multiple clients send data to the same Nightwatch project. I assume that’s what you meant, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants