Rhincodon / laravel-eloquent-spreadsheets by Rhincodon

Sync Eloquent models with google spreadsheets
87
8
5
Package Data
Maintainer Username: Rhincodon
Maintainer Contact: rhinodontypicus@gmail.com (rhinodontypicus)
Package Create Date: 2016-11-20
Package Last Update: 2019-08-13
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-12-19 03:17:45
Package Statistics
Total Downloads: 87
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 8
Total Watchers: 5
Total Forks: 5
Total Open Issues: 1

Laravel Eloquent sync with Google Spreadsheets

Latest Version on Packagist Software License StyleCI

Fast Preview:

Preview

Installation

Via Composer:

$ composer require rhincodon/laravel-eloquent-spreadsheets

Register Service Provider in config/app.php:

Rhinodontypicus\EloquentSpreadsheets\EloquentSpreadsheetsServiceProvider::class,

Publish config:

php artisan vendor:publish --provider="Rhinodontypicus\EloquentSpreadsheets\EloquentSpreadsheetsServiceProvider" --tag="config"

Fetch Google Credentials

In Google Console create Service Account:

Step 1:

Step 1

Step 2:

Step 2

After pressing Create it will give you credentials file, which you can use in your project. Just save it somewhere in storage.

You also need to give access to spreadsheets that will be used to that service Account. Just copy client_email from credentials file, and use it to give access.

Usage

To start use package you need to specify array of models that will be synced in config file. It is a self-explainable config.

For now is working add, update, delete actions from app to spreadsheet. And update action from spreadsheet to app. All actions processed in queue.

If you want sync(only update action work) data back to app from spreadsheet, schedule following command:

$schedule->command('eloquent-spreadsheets:sync')->hourly();

Roadmap

  • [ ] Tests

Credits

License

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