Closed SebastianSchoeps closed 3 years ago
We already have config options to not alias classes you want to ignore like the Livewire components you mention: https://github.com/laravel/tinker/blob/2.x/config/tinker.php#L46
@driesvints Thanks. Yes, I know about that, but that means, that I would have to constantly add new classes there. But if that's the way to go, so be it.
I often have projects where e.g. a Livewire component "User" is aliased before the model with the same name. That means that I have to type the namespace for the user model or enter every model manually in the config. I basically only ever need models aliased. Would a PR with something like the following in
ClassAliasAutoloader
be accepted?Tinker startup time will go up a little, but a) this time will be saved as soon as I have to enter the first model namespace b) it's only optional and disabled by default
Thanks!