Download the PHP package enflow/laravel-excel-exporter without Composer
On this page you can find all versions of the php package enflow/laravel-excel-exporter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download enflow/laravel-excel-exporter
More information about enflow/laravel-excel-exporter
Files in enflow/laravel-excel-exporter
Package laravel-excel-exporter
Short Description Push Laravel Excel exporters to Google Sheets or Google BigQuery
License MIT
Homepage https://github.com/enflow/laravel-excel-exporter
Informations about the package laravel-excel-exporter
Push Laravel Excel exports
The enflow/laravel-excel-exporter package provides an easy way to push Laravel Excel exports to Google Sheets and Google BigQuery.
Common use-cases include exporting data with Laravel Excel in your application while periodically syncing that same export to a Google Sheet or a Google BigQuery table.
Installation
You can install the package via Composer:
Authentication
This package uses the Google API PHP Client under the hood. You will need a Google Cloud project with the correct APIs enabled and a Service Account JSON key.
Create a Service Account JSON key:
1) Go to the Google Cloud Console
2) Create a new project or select an existing project
3) Go to APIs & Services > Credentials
4) Click Create Credentials > Service account
5) Enable the APIs you need in the project:
- For Google Sheets:
Google Sheets API - For Google BigQuery:
BigQuery API6) Fill in the required fields and clickCreate7) Select the created service account and clickAdd key>Create new key8) SelectJSONand clickCreate9) The JSON file will be downloaded to your computer 10) Store the downloaded JSON file securely. We recommendstorage/secrets/google-service-account.json.
Configuration
Publish the config file:
Register your exports in the exports array:
You can validate an export by running the push command interactively:
Scheduling
To periodically push all configured exports to their destinations, schedule the PushAll command. This will send all defined exports to their configured exporter:
Exporters
This package supports two exporters:
Google Sheets
Implement the ExportableToGoogleSheet interface on your export class and return the target Spreadsheet ID:
Google BigQuery
Set the project and dataset in the package config. Then implement ExportableToGoogleBigQuery on your export class and specify the table and schema:
Notes:
- Ensure the dataset exists in your BigQuery project. The table will be created or replaced automatically based on the schema you provide.
- Configure
project_id,dataset_id, and service account credentials inconfig/excel-exporter.php.
BigQuery layout guidance
Prefer a single dataset with multiple tables per project. Each export class can target a different table via googleBigQueryTableId() while sharing the configured dataset.
Console commands
excel-exporter:push— interactively push one configured export (or via--export=key).excel-exporter:push-all— push all configured exports.
Memory usage
Excel exports can be memory intensive. You may set memory_limit in config/excel-exporter.php for the duration of the push.
Testing
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Michel Bardelmeijer
- All Contributors
About Enflow
Enflow is a digital creative agency based in Alphen aan den Rijn, Netherlands. We specialize in developing web applications, mobile applications and websites. You can find more info on our website.
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-excel-exporter with dependencies
google/apiclient Version ^2.13
laravel/framework Version ^12.0|^13.0
maatwebsite/excel Version ^3.1
spatie/laravel-package-tools Version ^1.15