spatie / laravel-web-tinker

Tinker in your browser
https://spatie.be/open-source
MIT License
1.05k stars 68 forks source link

Can't execute code when running Laravel from subfolder #53

Closed shaffe-fr closed 4 years ago

shaffe-fr commented 4 years ago

When Laravel is setup outside of the web server document root, the code cannot be executed as the Laravel installation relative path is omitted. The Web tinker on URL http://localhost/my/sub/folder/public/tinker tries to execute code on http://localhost/tinker.

This adds a dependency to Laravel Routing module. Do you want me to add it to the composer.json file?

freekmurze commented 4 years ago

I want this package to be as simple as can be, that's why I'm not going to merge it in.

You can specify the value you want in the config file.

shaffe-fr commented 4 years ago

The laravel base path cannot be specified in the config file or the laravel route will not match causing a 404.

shaffe-fr commented 4 years ago

As the issue cannot be fixed by editing the config, do you think that this PR can be reopened @freekmurze? Thank you

freekmurze commented 4 years ago

I understand the problem now, thanks!

shaffe-fr commented 4 years ago

Thank you. I'll be more thorough next time :)