承接 ibnuhalimm/laravel-google-sheet 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ibnuhalimm/laravel-google-sheet

Composer 安装命令:

composer require ibnuhalimm/laravel-google-sheet

包简介

Google Sheet API wrapper for Laravel

README 文档

README

Latest Version on Packagist Total Downloads

Google Sheet API Wrapper for Laravel. Easiest way to interact with your sheet.

Contents

Requirements

  1. Create a Google Cloud project. If you want to use your existing project, you can jump to the next step.
  2. Create Service Acount Credentials on Google Developer Console and share your Google Sheet file to these service account email.
  3. Place your downloaded service account json file to storage/app/google-sheet/ folder, then rename these file to credentials.json.
  4. Enable Google Sheet API on Google Workspace APIs.

Installation

You can install the package via composer:

composer require ibnuhalimm/laravel-google-sheet

Optionally, you can publish the config file of this package with this command:

php artisan vendor:publish --provider="Ibnuhalimm\LaravelGoogleSheet\GoogleSheetServiceProvider"

or by mention the config tag

php artisan vendor:publish --tag=google-sheet-config

Usage

Fetch the data

You can use GoogleSheet facade (the alias or class itself).

use GoogleSheet;

$spreadSheetId = '1cyUalLbuw_TpAIgkf76JcU-BbsYCSwtVqJuf_gCNzYA';
$sheetName = 'Class Data';
$cellRange = 'A1:E5';

GoogleSheet::useDocument($spreadSheetId)->fetchData($sheetName, $cellRange);

This method will returns the subset of array data

=> [
     [
       "Student Name",
       "Gender",
       "Class Level",
       "Home State",
       "Major",
     ],
     [
       "Alexandra",
       "Female",
       "4. Senior",
       "CA",
       "English",
     ],
    ...

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 ibnuhalim@pm.me instead of using the issue tracker.

Credits

License

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

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-02-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固