spatie / laravel-web-tinker

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

Vue path #28

Closed wiretail closed 5 years ago

wiretail commented 5 years ago

This may not be the best way to do this -- but it worked well for me. Right now the "/tinker" path is easily changable the Larvel config, but hard-coded in the Vue file.

Changing that to "window.location.pathname" should let it work from any path configuration -- or in my case, when Laravel is running in subdirectory. (In that case, the Laravel path setting will not match the POST URL.)

freekmurze commented 5 years ago

I'd rather have the configured endpoint in the config explicitly passed through from the controller to the Blade views / vue components.

Could you update this PR to work that way?

wiretail commented 5 years ago

Sure, but it might take me a bit. I'll close and submit a new PR once I've got that worked out. Thanks!