定制 morrislaptop/firestore-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

morrislaptop/firestore-php

Composer 安装命令:

composer require morrislaptop/firestore-php

包简介

Firestore SDK for PHP without gRPC

README 文档

README

Current version Build Status

@todo

  • Get
  • Set
  • Delete
  • Add
  • Transactions (beginTransaction, commit, rollback)
  • Reference value support
  • Batch Get
  • List Documents
  • Query
  • Order
  • Limit
  • Indexes (create, delete, list, get)

Installation

The recommended way to install is with Composer.

composer require morrislaptop/firestore-php

Usage

The library aims to replicate the API signature of Google's PHP API.

Sample usage:

use Morrislaptop\Firestore\Factory;
use Kreait\Firebase\ServiceAccount;

// This assumes that you have placed the Firebase credentials in the same directory
// as this PHP file.
$serviceAccount = ServiceAccount::fromJsonFile(__DIR__ . '/google-service-account.json');

$firestore = (new Factory)
    ->withServiceAccount($serviceAccount)
    ->createFirestore();

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

// Save a document
$user->set(['name' => 'morrislaptop', 'role' => 'developer']);

// Get a document
$snap = $user->snapshot();
echo $snap['name']; // morrislaptop

统计信息

  • 总下载量: 28.97k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 69
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 2

GitHub 信息

  • Stars: 68
  • Watchers: 4
  • Forks: 31
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固