spatie/laravel-tinker-tools
Enables using short class names in Artisan Tinker sessions on older Laravel versions (built into Laravel 5.5+). Register ShortClassNames in .psysh.php and dump optimized autoload, then reference models like NewsItem::first() without full namespaces.
Use This When:
Look Elsewhere When:
alias NewsItem='App\Models\NewsItem';)."This is a 10-minute fix to make our developers’ lives easier—especially for teams working in older Laravel versions. By adopting this lightweight package, we’ll cut the time spent typing verbose class names in debugging sessions by ~30%, directly boosting productivity without any risk or cost. It’s a no-brainer for legacy projects where upgrading isn’t an option right now."
Key Talking Points:
*"This package lets you replace \App\Models\NewsItem::first() with just NewsItem::first() in Tinker—no setup, no side effects. Perfect for:
Trade-offs:
Proposal: Let’s trial this in [Project X]’s dev environment and measure the time saved. If it’s a hit, we can roll it out to other legacy projects."*
Engineering Focus:
composer require spatie/laravel-tinker-tools + service provider binding.How can I help you explore Laravel packages today?