I'm not sure about two things, so that's why I'm opening a PR.
Laravel has the class_uses_recursive function, based on PHPs class_uses function. But there's not function to return a boolean whether a class uses a trait or not. However, adding this function to helpers might be overkill?
As far as I know, there's no way to get the name of a trait like using ::class. So that's why it's a hardcoded string. If there's another way to do this, I'd be happy to hear.
I'm not sure about two things, so that's why I'm opening a PR.
class_uses_recursive
function, based on PHPsclass_uses
function. But there's not function to return a boolean whether a class uses a trait or not. However, adding this function to helpers might be overkill?::class
. So that's why it's a hardcoded string. If there's another way to do this, I'd be happy to hear.