I appreciate this is unconventional and likely unadvised but, at my wit's end trying to wrangle a WordPress plugin square peg into a round hole, I have given up and installed Laravel inside a WordPress plugin (yep!). For those not familiar with WordPress (lucky you), Laravel resides here:
https://mydomain.com/wp-content/plugins/MY_PLUGIN/MY_LARAVEL_INSTALL/
Incredibly, it works—and brings instant relief for what I need to do.
To hit my Laravel site home page, I visit:
https://mydomain.com/wp-content/plugins/MY_PLUGIN/MY_LARAVEL_INSTALL/public/
Pretty much everything works, make:auth, migrations, php artisan, etc.
I can make a new route like Route::get('my_route', 'SomeController@index'); and that works if I hit it at:
https://mydomain.com/wp-content/plugins/MY_PLUGIN/MY_LARAVEL_INSTALL/public/my_route
Encouraged by this, I installed Telescope and I can visit it too at the default path:
https://mydomain.com/wp-content/plugins/MY_PLUGIN/MY_LARAVEL_INSTALL/public/telescope
This successfully loads the Telescope interface, but when I click on one of the sidebar categories, the path is wrong on the click and so I get an eternal "Scanning..." message. For example, if I click on 'Requests' the URL is not:
https://mydomain.com/wp-content/plugins/MY_PLUGIN/MY_LARAVEL_INSTALL/public/telescope/requests
but
https://mydomain.com/telescope/requests
So, I know I'm trying to mix oil and water, and I know I'm bringing disgrace on our noble house etc., but can anyone think of a way to get Telescope to work in this scenario?
I've tried adding TELESCOPE_PATH=various_different_paths but to no avail
And by the way, this Laravel app will only ever have two routes: a redirect from WordPress and an endpoint form an external service... so it's not that bad.
Thanks!