Tinkerwell — The must-have tinker tool for every PHP and Laravel developer. In this blog post, I want to share one of my daily use cases with Tinkerwell. Of course, tinkering with random code is perfect with it–but there is a lot more where Tinkerwell can help you in your daily workflow.
I was using it to quickly inspect some database tables or to perform some more complicated queries to get more insights of my application.
Since tinkerwell allows you to run code snippets securely via ssh on your remote servers, you can connect to your application server and the complex query suddenly just becomes: Or even simpler, since my Course model has a "belongsToMany" relationship to users, I can do: And here's how that looks inside Tinkerwell: Now the benefit of tinkerwell doesn’t stop here.