clockwork icon indicating copy to clipboard operation
clockwork copied to clipboard

How to use Clockwork with multiple projects/urls?

Open madman-81 opened this issue 3 years ago • 1 comments

I'm running multiple projects, each with it's own URL, but it seems that Clockwork is always using the url from first project I installed it on. So if I want to test/debug http://project_B/ it's still using http://project_A/__clockwork/ because I started with project_A.

How can I change projects? Why isn't Clockwork requesting the /__clockwork/ url at the same host as the browser tab is on? Or am I doing something wrong?

madman-81 avatar Aug 17 '22 11:08 madman-81

create a custom service provider and update this method registerRoutes and add project path in all the routes that is register into main ClockServiceprovider. e.g

$router->get(env('PROJECT_PATH).'/__clockwork/{id:(?:[0-9-]+|latest)}/extended', 'Clockwork\Support\Lumen\Controller@getExtendedData');

ig23 avatar Aug 08 '23 08:08 ig23