firevel / firestore
Firestore wrapper for Laravel app running inside Google App Engine.
Installs: 15 547
Dependents: 2
Suggesters: 0
Security: 0
Stars: 7
Watchers: 3
Forks: 4
Open Issues: 2
Requires
- php: ^7.1|^8.0
- google/cloud-firestore: ^1.14.1
- google/protobuf: ^v3.13.0
- grpc/grpc: ^1.30.0
- illuminate/support: ^5.8||^6.0||^7.0||^8.0||^9.0||^10.0
README
Cloud Firestore library wrapper for Laravel and Firevel compatible with Google App Engine standard environment.
Installation
- If you don't have Firestore project set, check Cloud Firestore quick start
- Install package
composer require firevel/firestore
- Create php.ini in your project directory (where
app.yaml
is stored) with content:
; enable the gRPC extension
extension=grpc.so
; Ref.: https://github.com/colopl/laravel-spanner/issues/12
grpc.enable_fork_support = 1
If you use library outside Google App Engine please check gRPC installation guide.
Usage
To access FirestoreClient simply use Firestore
facade for example:
$data = [ 'name' => 'Los Angeles', 'state' => 'CA', 'country' => 'USA' ]; Firestore::collection('cities')->document('LA')->set($data);
Authentication
Inside Google App Engine Firestore should work without authentication. For usage outside App Engine check Authentication guide.