class_uses

Supported Versions: PHP 5 >= 5.4.0, PHP 7, PHP 8
Return the traits used by the given class
class_uses(object|string $object_or_classbool $autoload true): array|false
            $newValue $this->hydrateProperty($property$newValue);

        }



        foreach (
array_diff(class_uses_recursive($this), class_uses(self::class)) as $trait) {

            
$method 'hydratePropertyFrom'.class_basename($trait);



            if (
method_exists($this$method)) {
            $newValue $this->dehydrateProperty($property$newValue);

        }



        foreach (
array_diff(class_uses_recursive($this), class_uses(self::class)) as $trait) {

            
$method 'dehydratePropertyFrom'.class_basename($trait);



            if (
method_exists($this$method)) {
        )->useWritePdo()->get();



        if (
is_a($value->classPivot::class, true) ||

            
in_array(AsPivot::class, class_uses($value->class))) {

            return 
$collection;

        }
    function trait_uses_recursive($trait)

    {

        
$traits class_uses($trait) ?: [];



        foreach (
$traits as $trait) {

            
$traits += trait_uses_recursive($trait);
        $app parent::getApplication();



        foreach (
$app->all() as $command) {

            if (! 
in_array(RunsInPlease::class, class_uses($command))) {

                
$command->setHidden(true);

            }

        }
    {

        
$command $this->laravel->make($command);



        if (! 
in_array(RunsInPlease::class, class_uses($command))) {

            
$this->deferredCommands[] = $command;



            return;