public function raw($customAttributes = [])
    {
        // If the first argument is a string, we'll assume it's the class name
        // of a different model to create.
        if (is_string($customAttributes)) {
            return $this->populator->raw(...func_get_args());
        }

        // We need to make() the model first since closures attributes receive the model instance.
        return $this->make($customAttributes)->toArray();
    }
public function raw($customAttributes = [])
    {
        // If the first argument is a string, we'll assume it's the class name
        // of a different model to create.
        if (is_string($customAttributes)) {
            return $this->populator->raw(...func_get_args());
        }

        // We need to make() the model first since closures attributes receive the model instance.
        return $this->make($customAttributes)->toArray();
    }
public function raw ( $ customAttributes = [ ] ) { // If the first argument is a string, we'll assume it's the class name // of a different model to create. if ( is_string ( $ customAttributes ) ) { return $ this -> populator -> raw ( ... func_get_args ( ) ) ; } // We need to make() the model first since closures attributes receive the model instance. return $ this -> make ( $ customAttributes ) -> toArray ( ) ; }
Create the given model and convert it to an array.

@param  array $customAttributes Custom attributes that will override the guessed formatters.
@return array
Create the given model and convert it to an array .