google/cloud-spanner
Idiomatic PHP client for Google Cloud Spanner, a globally consistent relational database. Install via Composer and use gRPC to connect to instances/databases, run SQL queries with parameters, and benefit from V2 multiplexed sessions for efficient concurrent requests.
For Executives: "This package lets us leverage Google Cloud Spanner—a globally distributed SQL database—directly from our Laravel apps. It eliminates the complexity of managing multi-region PostgreSQL clusters while ensuring strong consistency for critical transactions (e.g., payments, inventory). Spanner’s automatic scaling and 99.999% uptime SLA reduce downtime risks, and its pay-as-you-go pricing aligns with our cost-efficiency goals. We can start with a single region and expand globally without rewriting code."
For Engineering: *"The google/cloud-spanner package provides a PHP-native client for Spanner’s V2 API, with features like:
For Developers:
*"Swap your DB::connection() calls for Spanner’s transactional SQL with minimal changes. Example:
$db = $spanner->connect('instance', 'database');
$user = $db->execute('SELECT * FROM users WHERE id = @id', ['parameters' => ['id' => 1]])->rows()->current();
Pros:
How can I help you explore Laravel packages today?