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.

7.0(10mo ago)13.0kMITPHPPHP ^8.1

Since Jul 8Pushed 10mo 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 1mo ago

READMEChangelogDependencies (2)Versions (21)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 class 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 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

38

—

LowBetter than 84% of packages

Maintenance56

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Recently: every ~6 days

Total

20

Last Release

324d 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

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

7.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7360ec98416a57085670d0bf4b62bd6fd05dbc29f5e0e087ac8851dfe6bd2e38?d=identicon)[aigorlaxy](/maintainers/aigorlaxy)

---

Top Contributors

[![aigorlaxy](https://avatars.githubusercontent.com/u/122545407?v=4)](https://github.com/aigorlaxy "aigorlaxy (38 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

[watson/validating

Eloquent model validating trait.

9723.3M46](/packages/watson-validating)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[genealabs/laravel-pivot-events

This package introduces new eloquent events for sync(), attach(), detach() or updateExistingPivot() methods on BelongsToMany relation.

1404.9M8](/packages/genealabs-laravel-pivot-events)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)

PHPackages © 2026

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