Support the ongoing development of Laravel.io →
Requests Database
Last updated 2 years ago.
0

I know it's not technically solving your problem, but you should really not be dispatching requests from artisan commands, and I don't think it'll work, or if it does it'll have some difficult-to-debug side effects.

You need to abstract your controller code into a service and then just call the service from both your command and controller instead of trying to use an artisan command to send HTTP requests to your own application.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.