PHPackages                             aigorlaxy/google-sheets-model-importer - 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. [Database &amp; ORM](/categories/database)
4. /
5. aigorlaxy/google-sheets-model-importer

ActiveLibrary[Database &amp; ORM](/categories/database)

aigorlaxy/google-sheets-model-importer
======================================

A simple trait to insert or update data to models from Google Sheets with just the link of the published spreadsheet. No need of Google API.

13(2mo ago)13.2kMITPHPPHP ^8.3

Since Jul 8Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/aigorlaxy/google-sheets-model-importer)[ Packagist](https://packagist.org/packages/aigorlaxy/google-sheets-model-importer)[ RSS](/packages/aigorlaxy-google-sheets-model-importer/feed)WikiDiscussions master Synced 2d ago

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

Google Sheets Model Importer
============================

[](#google-sheets-model-importer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/aa5f5a5a831851f9866fe7fc959384c058ca0edd62c5eec2e6d042013a2e0000/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6169676f726c6178792f676f6f676c652d7368656574732d6d6f64656c2d696d706f727465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aigorlaxy/google-sheets-model-importer)[![Total Downloads](https://camo.githubusercontent.com/0b2bb41e8536013070dada3b704cc09f8a58019b75bb918c7c8ea855b2ab078c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6169676f726c6178792f676f6f676c652d7368656574732d6d6f64656c2d696d706f727465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aigorlaxy/google-sheets-model-importer)

A simple Laravel support trait to insert or update data to models from Google Sheets with just the link of the published spreadsheet. No need of Google API.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require aigorlaxy/google-sheets-model-importer
```

Using
-----

[](#using)

1. Create a Google Spreadsheet.
2. Publish it to internet and set general access to anyone with the link can be a viewer.
3. Include the trait in your model class.
4. $spreadsheetId: is the id of your google sheets. You will use your published Google Sheets link to get it. The link will look something like that: [https://docs.google.com/spreadsheets/d/e/YOU\_GOOGLE\_SHEET\_SPREADSHEET\_ID/something\_else](https://docs.google.com/spreadsheets/d/e/YOU_GOOGLE_SHEET_SPREADSHEET_ID/something_else)
5. $sheetIds: If you have just one tab for that model, use the gid as a string. If you have more than one tab for the same model, use array. All models must match the same column schema to work. The link will look something like that: [https://docs.google.com/spreadsheets/d/YOUR\_SPREADSHEET\_ID/edit?gid=YOUR\_SHEET\_ID](https://docs.google.com/spreadsheets/d/YOUR_SPREADSHEET_ID/edit?gid=YOUR_SHEET_ID)
6. $updateColumnIndex: Optionaly you can set a different primary key to check for updates. if your primary key is not default id or you want to track updates based on another column. If not set, it will assume that id column is your primary key.
7. $colunsToSkip: You can also optionaly set columns to be skipped. The app will search for columns that contains any of that strings and will skip the import for that ones. You can set a single string or an array.
8. Example of usage:

```
use Illuminate\Database\Eloquent\Model;
use Aigorlaxy\GoogleSheetsModelImporter\GoogleSheetsImportable;

class YourModel extends Model
{
Use GoogleSheetsImportable;

$model = User::class;
$googleSpreadSheetId = '1gaLFuSnh20kggxEaasr511s15vt3olKqp9o12HenDLI3vA7pg';
$sheetId = '15144122';

$model::getFreshTableFromGoogleSheets($spreadsheetId, $sheetIds); // Truncate the current table and inserting the new data.
$model::updateOrCreateFromGoogleSheets($spreadsheetId, $sheetIds); // Updating and inserting new data.
}
```

10. Any issue or suggestions, please send me an e-mail:

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance84

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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 ~28 days

Recently: every ~75 days

Total

24

Last Release

80d ago

Major Versions

v1.0.3 → v3.0.02024-09-08

v3.5.3 → v4.0.02025-05-24

4.2 → 5.02025-05-24

5.0 → 7.02025-06-19

7.0 → 8.12026-04-15

PHP version history (3 changes)v1.0.0PHP ^7.3|^8.0

7.0PHP ^8.1

13PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/122545407?v=4)[Igor Borges](/maintainers/aigorlaxy)[@aigorlaxy](https://github.com/aigorlaxy)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/aigorlaxy-google-sheets-model-importer/health.svg)

```
[![Health](https://phpackages.com/badges/aigorlaxy-google-sheets-model-importer/health.svg)](https://phpackages.com/packages/aigorlaxy-google-sheets-model-importer)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[laravel-liberu/laravel-gedcom

A package that converts gedcom files to Eloquent models

782.5k1](/packages/laravel-liberu-laravel-gedcom)

PHPackages © 2026

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