I'm using PHP-RQL library to work with RethinkDB, i need to get changes when new data inserted. but i'm getting PHP Fatal error: Uncaught RqlDriverError: Options must be an array.
in api documentation its says:
table->changes(array('squash' => true, 'include_states' => false)) → stream
singleSelection->changes(array('squash' => true, 'include_states' => false)) → stream
Return an infinite stream of objects representing changes to a query.
Example: Subscribe to the changes on a table.
r\table('games')->changes()->run($conn, function($err, $cursor) {
$cursor->each($console->$log)
})
How to subscribe to the changes on a table? This example is doesn't work.