Indatus\Ranger\ApiDatabase\QueryExecution\CollectionQuery::post PHP Метод

post() защищенный Метод

In collection because I want to add an instance to a collection This could go to the InstanceQuery class instead
protected post ( )
    protected function post()
    {
        $input = $this->requestContainer->getInput();
        $instance = $this->builder->newInstance($input);
        if (!$instance->save()) {
            throw new ValidationErrorException();
        }
        return array_fill_keys(['instance'], $instance->toArray());
    }