PHPackages                             mitni/laravel-google-spreadsheet - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mitni/laravel-google-spreadsheet

AbandonedLibrary[Utility &amp; Helpers](/categories/utility)

mitni/laravel-google-spreadsheet
================================

Google spreadsheet client for Laravel based off mach3ss@gmail.com

v0.1.2(10y ago)57383MITPHP

Since Sep 3Pushed 9y ago1 watchersCompare

[ Source](https://github.com/punkrockio/google-spreadsheet.php)[ Packagist](https://packagist.org/packages/mitni/laravel-google-spreadsheet)[ RSS](/packages/mitni-laravel-google-spreadsheet/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

### Out of Date!!

[](#out-of-date)

The google API has changed, so I need to update this package
============================================================

[](#the-google-api-has-changed-so-i-need-to-update-this-package)

Google Spreadsheet Client for Laravel/PHP
=========================================

[](#google-spreadsheet-client-for-laravelphp)

Originally forked from mach3/google-spreadsheet.php to work with Laravel 5.x (and correct namespacing)

Google Spreadsheet Client for Laravel/PHP.

Get started
-----------

[](#get-started)

### 1. Get key file

[](#1-get-key-file)

1. Log in [Google Developper Console](https://console.developers.google.com)
2. Create new project
3. Create **Service Account** credentials in the project
4. Download key file as JSON

### 2. Create spreadsheet

[](#2-create-spreadsheet)

1. Create a new spreadsheet in [Google Drive](https://drive.google.com)
2. Authorize the email address, which is found as "client\_email" in key file, to read and edit.
3. Save the **file ID** from address bar.

### 3.1 Composer

[](#31-composer)

composer require mitni/laravel-google-spreadsheet

This requires "google/apiclient" package, but that should be included by default.

### 3.2 Access by PHP

[](#32-access-by-php)

```
use Mitni\Google\GoogleSpreadsheet;

$client = GoogleSpreadsheet::getClient("the/path/to/credential.json");
// Get the file by file ID
$file = $client->file("XXXxxxXXXXxxxXXXX");
// Get the sheet by title
$sheet = $file->sheet("Sheet1");
// Flush all rows in the sheet
var_dump($sheet->items);
```

Usage
-----

[](#usage)

### Select rows

[](#select-rows)

```
// Array
$items = $sheet->select(array("id" => "1"));
// Closure
$items = $sheet->select(function($row){
	return (int) $row["age"] < 30;
});
```

### Insert a new row

[](#insert-a-new-row)

```
$sheet->insert(array(
	"name" => "John",
	"age" => 23,
	"email" => "john@example.com"
));
```

### Update column's value

[](#update-columns-value)

```
$sheet->update(
	8, // row number
	"name", // field's name (or column number as Integer)
	"Tom"
);
```

### Get up-to-date table data

[](#get-up-to-date-table-data)

```
$items = $sheet->fetch(true)->items;
```

### Save cache

[](#save-cache)

```
$client->config(array(
	"cache" => true,
	"cache_dir" => "cache",
	"cache_expires" => 3600
));
```

Requirement
-----------

[](#requirement)

- [google/apiclient](https://github.com/google/google-api-php-client) (Apache License v2.0)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

3

Last Release

3942d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/15591a3b29cfb4617351cc5c474d6d2764a80ecef6195f34711a7f9507eff84d?d=identicon)[mitni455](/maintainers/mitni455)

---

Top Contributors

[![mach3](https://avatars.githubusercontent.com/u/342838?v=4)](https://github.com/mach3 "mach3 (4 commits)")

### Embed Badge

![Health badge](/badges/mitni-laravel-google-spreadsheet/health.svg)

```
[![Health](https://phpackages.com/badges/mitni-laravel-google-spreadsheet/health.svg)](https://phpackages.com/packages/mitni-laravel-google-spreadsheet)
```

###  Alternatives

[aimeos/laravel-analytics-bridge

Unified analytics bridge for Laravel

1752.0k7](/packages/aimeos-laravel-analytics-bridge)[voidagency/vactory_starter_kit

Vactory is a custom Drupal profile which is developed and released by VOID Agency.

1020.9k](/packages/voidagency-vactory-starter-kit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
