protected function modelHasTrait($names)
    {
        if ( ! is_array($names)) {
            $names = (array) $names;
        }

        return (bool) count(array_intersect($names, $this->getTraitNames()));
    }
protected function modelHasTrait($names)
    {
        if ( ! is_array($names)) {
            $names = (array) $names;
        }

        return (bool) count(array_intersect($names, $this->getTraitNames()));
    }
protected function modelHasTrait ( $ names ) { if ( ! is_array ( $ names ) ) { $ names = ( array ) $ names ; } return ( bool ) count ( array_intersect ( $ names , $ this -> getTraitNames ( ) ) ) ; }
Returns whether the model class uses a trait by a name or list of names.

@param string|string[] $names
@return bool
Returns whether the model class uses a trait by a name or list of names .