Skip to content

Conversation

@rpaggi
Copy link

@rpaggi rpaggi commented Jan 21, 2025

I extract and add the same function that currently exists in Laravel's Tinker to automatically create class aliases.

I'm sending this PR to analyze whether it makes sense to implement this functionality and for possible adjustments to the code.

image

@luanfreitasdev
Copy link
Member

I find this interesting, especially on Windows or when the LSP doesn't suggest the model namespace.

@@ -0,0 +1,152 @@
<?php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't duplicate from Tinker. if the project is Laravel then it has Tinker in it and you can just check if the Class exists and use it instead of copying it

@@ -0,0 +1,59 @@
<?php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same opinion on this as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants