rhincodon/laravel-eloquent-spreadsheets

Sync Eloquent models with google spreadsheets
88 9
Install
composer require rhincodon/laravel-eloquent-spreadsheets
Latest Version:0.1.5
PHP:^7.0
License:MIT
Last Updated:Aug 13, 2019
Links: GitHub  ·  Packagist
Maintainer: Rhincodon

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.

Related Packages

spatie/laravel-analytics

A Laravel package to retrieve Google Analytics data.

6,456,468 3,241
spatie/laravel-translatable

A trait to make an Eloquent model hold translations

30,089,119 2,462
spatie/laravel-sluggable

Generate slugs when saving Eloquent models

14,394,488 1,555
kodeine/laravel-acl

Light-weight role-based permissions for Laravel 5 built in Auth system.

364,261 774