Controllers\xAPI\StatementStoreController::update PHP Method

update() public method

Updates (PUTs) Statement with the given id.
public update ( $options ) : Response
return Response
    public function update($options)
    {
        $this->createStatements($options, function ($statements) {
            $statement_id = \LockerRequest::getParam(StatementController::STATEMENT_ID);
            // Returns a error if identifier is not present.
            if (!$statement_id) {
                throw new Exceptions\Exception('A statement ID is required to PUT.');
            }
            // Adds the ID to the statement.
            $statements[0]->id = $statement_id;
            return $statements;
        });
        return IlluminateResponse::make('', 204, $this->getCORSHeaders());
    }