定制 laraditz/google-sheets 二次开发

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

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

laraditz/google-sheets

最新稳定版本:1.0.0

Composer 安装命令:

composer require laraditz/google-sheets

包简介

Wrapper for Google Sheets API V4

README 文档

README

Latest Version on Packagist Total Downloads GitHub Actions

A simple wrapper for Google Sheets API V4.

Installation

You can install the package via composer:

composer require laraditz/google-sheets

Setup

  1. This api uses Authentication with Service Accounts. Follow the instructions to Create a Service Account.
  2. Download the JSON credentials.
  3. By default the path to the credentials is at storage app/credentials.json. You can set your own path by overwrite the value through GOOGLE_SHEETS_AUTH_CONFIG env.
  4. There are also other .env value that you can overwrite to suites your need as below:-
GOOGLE_SHEETS_APP_NAME="Google Sheets"
GOOGLE_SHEETS_ACCESS_TYPE=offline
GOOGLE_SHEETS_AUTH_CONFIG="app/credentials.json"

Usage

$spreadsheetId = "XXxXXxXXXXXx_XXxXXxXXXXXx_XXxXXxXXXXXx"; // this will be your spreadsheet ID
$range = "Sheet 1"; // here we use the name of the Sheet to get all the rows

// read all the rows of given sheet, sheet will return a Collection and you may use any of Collection method such as all(), toArray(), etc
$sheets = app('google-sheets')->spreadsheet($spreadsheetId)->sheet($range)->all();

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email raditzfarhan@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Package Dependencies

This package depends on https://github.com/googleapis/google-api-php-client

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固