Store a newly created resource in storage.

@param array $data
@return \Illuminate\Database\Eloquent\Model
337460
public function store($data)
    {
        $modelName = $this->modelFullName;
        if($this->validate($data, $modelName::$rules))
        {
            $model = $modelName::create($data);
            return $model;
        }
    }
1262931
public function create(array $data) {
        $data[$this->foreignKey] = $this->parent->{$this->localKey};
        return call_user_func(sprintf('%s::create', $this->query->getModelName()), $data);
    }
415803
public function store(array $data)
    {
        $exception = new ExceptionModel();

        $exception->type = $data['exception'];
        $exception->code = $data['code'];
        $exception->message = $data['message'];
        $exception->file = $data['file'];
        $exception->line = $data['line'];
        $exception->trace = $data['trace'];
        $exception->method = $data['method'];
        $exception->path = $data['path'];
        $exception->query = $data['query'];
        $exception->body = $data['body'];
        $exception->cookies = $data['cookies'];
        $exception->headers = $data['headers'];
        $exception->ip = $data['ip'];

        try {
            $exception->save();
        } catch (\Exception $e) {
            //dd($e);
        }

        return $exception->save();
    }
1220679
public function store(array $data)
    {
        $projectConstruction = $this->client->post(
            sprintf('templates/%d/project_constructions.json', $this->parent),
            [
                'json' => $data,
            ]
        );

        return $this->response($projectConstruction);
    }
651358
public static function make($data = [])
    {
        // filter empty values
        $data = array_filter($data);

        // remove auto data;
        unset($data['id']);
        unset($data['created_at']);
        unset($data['updated_at']);

        //
        $model = new static($data);

        return $model;
    }
1367440
protected function buildModel(array $data = array()){
        $Model = NULL;
        if (isset($this->model)){
            $Model = new $this->model();
            $Model->setBaseUrl($this->getBaseUrl());
            if ($this->getAuth() !== NULL) {
                $Model->setAuth($this->getAuth());
            }
            if (!empty($data)){
                foreach($data as $key => $value){
                    $Model->set($key,$value);
                }
            }
        }
        return $Model;
    }
630573
public function create(array $data) {
        $this->_checkAcl('create');
        $pk = $this->_model->insert($data);
        return $pk;
    }
118236
public function setData(array $data)
    {
        $data = $this->setIdFromData($data);

        parent::setData($data);
        return $this;
    }
1036680
public function setData(array $data)
    {
        foreach ($data as $key => $val) {
            $setter = $this->setter($key);
            if (is_callable([ $this, $setter ])) {
                $this->{$setter}($val);
            } else {
                $this->{$key} = $val;
            }
        }

        return $this;
    }
304311
protected function create(array $data)
    {
        $user = UserModel::create($data);
        return User::find($user->id);
    }
1296036
protected function create(array $data)
    {
        return User::create([
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => bcrypt($data['password']),
            'token' => $this->userRepository->createToken(),
            'active' => 1,
        ]);
    }
888479
public function create($data = [])
	{
		$created = $this->model->create($data);

		if( ! $created)
		{
			return new Payload(null, 'not_created');
		}

		return new Payload($created, 'created');
	}
1144418
public function create( $data )
	{
		$record = $this->fill( $data );

		if( is_array($record) )
		{
			$this->collection()->insert($record);
		}

		return $record;
	}
257355
public function create(array &$data = null) {
		$modelClass = $this->getModelClass();

		$model = $modelClass::factory($data);
		$model->setDatagate($this);

		if ($this->hasLocator()) {
			$model->setLocator($this->getLocator());
		}

		if (empty($data)) {
			$model->forceInsert();
		}

		return $model;
	}
695860
public function store(array $data)
    {
        $todo = $this->client->post(
            sprintf('buckets/%d/todolists/%d/todos.json', $this->bucket, $this->parent),
            [
                'json' => $data,
            ]
        );

        return new Todo($this->response($todo));
    }
264442
public function createOne($data)
    {
        $row = $this->getTable()::create();

        $data = $this->filterData($data);

        $row->setFromArray($data);
        return $row->save();
    }
604725
public function save($data)
    {
        if (is_array($data)) {
            foreach ($data as $entity) {
                $this
                    ->manager
                    ->persist($entity);
            }
        } else {
            $this
                ->manager
                ->persist($data);
        }

        $this
            ->manager
            ->flush($data);

        return $data;
    }