New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

tormjens/firestore

Firestore SDK for Laravel
2,083
Install
composer require tormjens/firestore
Latest Version:2.1.1
Laravel:8 – 13
License:MIT
Last Updated:May 29, 2026
Links: GitHub  ·  Packagist
Maintainer: tormjens

Firestore SDK for Laravel (without gRPC)

Leveraging the Google PHP API Client for communication.

Installation

This package is installed via Composer.

composer require tormjens/firestore

Due to Laravel's auto-discovery capabilities, the service provider is registerered automatically.

Usage

This package aims to create a fluent experience, preserving the feel of the Laravel framework.

Getting started

You first resolve Firestore out of the container.

use TorMorten\Firestore\Firestore;
$firestore = resolve(Firestore::class);

You can also resolve using dependency injection.

public function __construct(Factory $firestore)
{
    $this->firestore = $firestore;
}

You can now start grabbing stuff from Firestore. First you'll need to define the collection your looking into.

$collection = $firestore->collection('users');

You'll now have the collection at hand, and can either select all documents in that collection:

$documents = $collection->documents();

Or you can grab a single document:

$document = $collection->document('1234');

Be aware that the last one simply creates an instance of a document. If you want to fetch the document from firebase you'll have to add ->fetch() to that call.

Sample usage:


$collection = $firestore->collection('users');
$user = $collection->document('123456');

// Fetches the document from Firebase
$user->fetch();

// Create/update a document
$user->update(['name' => 'tormjens', 'role' => 'developer']);

// Get a document
echo $user->name; // tormjens

// Delete a document
$user->delete();

Related Packages

kreait/laravel-firebase

A Laravel package for the Firebase PHP Admin SDK

22,766,193 1,304
tomatophp/laravel-firebase

A Laravel package for the Firebase PHP Admin SDK

3,732 1
neclimdul/marketo-rest

Marketo Rest API library

120,806 1
orzcc/taobao-top-client

Taobao top client(SDK) for laravel

26,152 105
betalabs/engine-sdk-gateway

Gateway SDK for internal apps Engine

22,070 0

Version History

Version Released Laravel License
2.1.1 ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0|^14.0 MIT
2.1 ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0|^14.0 MIT
2.0.12 ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0|^14.0 MIT
2.0.11 ^8.0|^9.0|^10.0|^11.0 MIT
2.0.10 ^8.0|^9.0|^10.0|^11.0 MIT