Create a profile attribute

@param array $allAttributes Profile attribute properties as an array.
@return mixed Post operation result
343648
public function CreateProfileAttributes($allAttributes)
    {
        $attrs = new ET_ProfileAttribute();
        $attrs->authStub = $this;
        $attrs->props = $allAttributes;
        return $attrs->post();
    }
514680
protected function buildAttributes($attributes)
    {
        if ( ! $attributes) {
            return;
        }

        $attributeMap = [];
        foreach ($attributes as $attribute => $value) {
            $attributeMap[] = $attribute . '="' . $value . '"';
        }

        return implode($attributeMap, ' ');
    }
1016036
public function buildAttrs(array $attrs = array())
    {
        $result = ' ';
        foreach ($attrs as $key => $param) {
            $param = (array) $param;
            if ($key === 'data') {
                $result .= $this->_buildDataAttrs($param);
                continue;
            }

            $value = implode(' ', $param);
            $value = $this->_cleanValue($value);

            if ($key !== 'data' && $attr = $this->_buildAttr($key, $value)) {
                $result .= $attr;
            }
        }

        return trim($result);
    }
265872
public function firstOrCreate(array $attributes, array $values = [])
    {
        if (! is_null($instance = $this->where($attributes)->first())) {
            return $instance;
        }

        return tap($this->newModelInstance($attributes + $values), function ($instance) {
            $instance->save();
        });
    }
1223840
public static function create(array $attributes)
    {
        $instance = new static;

        $path = $instance->getPath('store');

        return $instance->newQuery()
            ->postField($attributes)
            ->from($path)
            ->create();
    }
543641
public function createNew(
        string $slug,
        string $attribute
    ) : array {

        return $this->sendPost(
            sprintf('/profiles/%s/flags', $this->userName),
            [],
            [
                'slug'      => $slug,
                'attribute' => $attribute
            ]
        );
    }
413315
public static function create(array $attributes = [])
    {
        $site_id = site()->id;

        $contact = new static;

        $fillable = $contact->getFillable();

        foreach (array_only($attributes, $fillable) as $key => $value) {

            if  (is_array($value)) {
                $value = json_encode($value);
            }
            $row = Setting::privateOnly()->firstOrNew(compact('key', 'site_id'));
            $row->fill(compact('value'));
            $row->save();
        }

        return true;
    }
1123904
public function create(array $attributes)
    {
        if (!is_null($this->validator)) {
            // we should pass data that has been casts by the model
            // to make sure data type are same because validator may need to use
            // this data to compare with data that fetch from database.
            if( $this->versionCompare($this->app->version(), "5.2.*", ">") ){
                $attributes = $this->model->newInstance()->forceFill($attributes)->makeVisible($this->model->getHidden())->toArray();
            }else{
                $model = $this->model->newInstance()->forceFill($attributes);
                $model->addVisible($this->model->getHidden());
                $attributes = $model->toArray();
            }

            $this->validator->with($attributes)->passesOrFail(ValidatorInterface::RULE_CREATE);
        }

        $model = $this->model->newInstance($attributes);
        $model->save();
        $this->resetModel();

        event(new RepositoryEntityCreated($this, $model));

        return $this->parserResult($model);
    }
580382
public static function create(array $attributes = [])
    {
        $user = new static($attributes);

        $user->setPassword($attributes['password']);

        $user->save();

        return $user;
    }
854548
public function setAttribs(array $aAttribs)
    {
        if (!isset($aAttribs['method']))
            $aAttribs['method'] = 'POST';
        $aAttribs['class'] = isset($aAttribs['class'])
            ? $aAttribs['class'] . ' sked-form' : 'sked-form';
        $this->aAttribs = $aAttribs;
        return $this;
    }
1206762
public function newInstance($attributes = [], $exists = false)
    {
        $model = new static((array) $attributes, $this->parent, $this->table, $exists);
        $model->setPivotKeys($this->getForeignKey(), $this->getRelatedKey());
        return $model;
    }
1226748
public function forceCreate(array $attributes)
    {
        $instance = $this->model->newInstance()->setConnection(
            $this->query->getConnection()->getName()
        );

        return $this->model->unguarded(function () use ($attributes, $instance) {
            return $instance->create($attributes);
        });
    }
195186
public function create(array $attributes)
    {
        $instance = $this->related->newInstance($attributes);

        $this->setForeignAttributesForCreate($instance);

        $instance->save();

        return $instance;
    }
70349
public function create($customAttributes = [])
    {
        if (is_string($customAttributes)) {
            return $this->populator->create(...func_get_args());
        }

        return $this->make($customAttributes, true);
    }
546851
public function createAction()
    {
        if ($this->request->isPost()) {

            $profile = new Profiles([
                'name' => $this->request->getPost('name', 'striptags'),
                'active' => $this->request->getPost('active')
            ]);

            if (!$profile->save()) {
                $this->flash->error($profile->getMessages());
            } else {
                $this->flash->success("Profile was created successfully");
            }

            Tag::resetInput();
        }

        $this->view->form = new ProfilesForm(null);
    }
851300
public function getPublicAttributes()
    {
        $atts = [];

        foreach ($this->attributes as $key => $value) {
            $atts[$key] = $this->__get($key);
        }

        return $atts;
    }
22764
public function create( array $attributes = [] )
	{
		$results = $this->make( $attributes );

		if ( $this->amount === 1 )
			$results->save();
		else
			foreach ( $results as $result )
				$result->save();

		return $results;
	}