Skip to content

2.0.2

Compare
Choose a tag to compare
@jeromegamez jeromegamez released this 26 Dec 21:02
· 1451 commits to 7.x since this release
2.0.2
3c3b6a8

Added a SERVER_TIMESTAMP constant to the Firebase\Database class to ease the population of fields with Firebase's timestamp server value

use Firebase\Database;

$ref = $db->getReference('my-ref')
          ->set('created_at', Database::SERVER_TIMESTAMP); 

is equivalent to

$ref = $db->getReference('posts/my-post')
          ->set('created_at', ['.sv' => 'timestamp']);