{"id":31791358,"url":"https://github.com/enflow/laravel-excel-exporter","last_synced_at":"2026-01-20T16:49:43.107Z","repository":{"id":318539050,"uuid":"1071679897","full_name":"enflow/laravel-excel-exporter","owner":"enflow","description":"Push Laravel Excel exporters to Google Sheets or Google Big Query","archived":false,"fork":false,"pushed_at":"2025-10-07T18:26:38.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-07T20:35:15.113Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/enflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":"https://enflow.nl/contact"}},"created_at":"2025-10-07T17:05:44.000Z","updated_at":"2025-10-07T18:26:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f75ecdb-92ac-4fda-9f53-729802499a83","html_url":"https://github.com/enflow/laravel-excel-exporter","commit_stats":null,"previous_names":["enflow/laravel-excel-exporter"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/enflow/laravel-excel-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enflow%2Flaravel-excel-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enflow%2Flaravel-excel-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enflow%2Flaravel-excel-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enflow%2Flaravel-excel-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enflow","download_url":"https://codeload.github.com/enflow/laravel-excel-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enflow%2Flaravel-excel-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004690,"owners_count":26083753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-10T16:56:32.463Z","updated_at":"2025-10-10T16:56:34.552Z","avatar_url":"https://github.com/enflow.png","language":"PHP","funding_links":["https://enflow.nl/contact"],"categories":[],"sub_categories":[],"readme":"# Push Laravel Excel exports\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/enflow/laravel-excel-exporter.svg?style=flat-square)](https://packagist.org/packages/enflow/laravel-excel-exporter)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![Total Downloads](https://img.shields.io/packagist/dt/enflow/laravel-excel-exporter.svg?style=flat-square)](https://packagist.org/packages/enflow/laravel-excel-exporter)\n\nThe `enflow/laravel-excel-exporter` package provides an easy way to push Laravel Excel exports to Google Sheets and Google BigQuery.\n\nCommon 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.\n\n## Installation\nYou can install the package via Composer:\n\n``` bash\ncomposer require enflow/laravel-excel-exporter\n```\n\n## Authentication\nThis package uses the [Google API PHP Client](https://github.com/googleapis/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.\n\nCreate a Service Account JSON key:\n\n1) Go to the [Google Cloud Console](https://console.cloud.google.com/)\n2) Create a new project or select an existing project\n3) Go to `APIs \u0026 Services` \u003e `Credentials`\n4) Click `Create Credentials` \u003e `Service account`\n5) Enable the APIs you need in the project:\n   - For Google Sheets: `Google Sheets API`\n   - For Google BigQuery: `BigQuery API`\n6) Fill in the required fields and click `Create`\n7) Select the created service account and click `Add key` \u003e `Create new key`\n8) Select `JSON` and click `Create`\n9) The JSON file will be downloaded to your computer\n10) Store the downloaded JSON file securely. We recommend `storage/secrets/google-service-account.json`.\n\n## Configuration\n\nPublish the config file:\n\n```bash\nphp artisan vendor:publish --tag=\"laravel-excel-exporter-config\"\n```\n\nRegister your exports in the `exports` array:\n```php\n'exports' =\u003e [\n    // key =\u003e Export class (must be resolvable from the container)\n    'teams' =\u003e \\App\\Exports\\TeamsExport::class,\n],\n```\n\nYou can validate an export by running the push command interactively:\n\n```bash\nphp artisan excel-exporter:push\n```\n\n### Scheduling\n\nTo periodically push all configured exports to their destinations, schedule the `PushAll` command. This will send all defined exports to their configured exporter:\n\n```php\nuse Enflow\\LaravelExcelExporter\\Commands\\PushAll;\n\n$schedule-\u003ecommand(PushAll::class)-\u003edailyAt('03:00')-\u003eenvironments('production');\n```\n\n## Exporters\n\nThis package supports two exporters:\n\n### Google Sheets\n\nImplement the `ExportableToGoogleSheet` interface on your export class and return the target Spreadsheet ID:\n\n```php\nuse Enflow\\LaravelExcelExporter\\Exporters\\GoogleSheet\\ExportableToGoogleSheet;\n\nclass TeamsExport implements ExportableToGoogleSheet\n{\n    public function googleSpreadsheetId(): string\n    {\n        return 'your-spreadsheet-id';\n    }\n    \n    // ... other export methods\n}\n```\n\n### Google BigQuery\n\nSet the project and dataset in the package config. Then implement `ExportableToGoogleBigQuery` on your export class and specify the table and schema:\n\n```php\nuse Enflow\\LaravelExcelExporter\\Exporters\\GoogleBigQuery\\ExportableToGoogleBigQuery;\n\nclass TeamsExport implements ExportableToGoogleBigQuery\n{\n    public function googleBigQueryTableId(): string\n    {\n        return 'teams';\n    }\n\n    public function googleBigQuerySchema(): array\n    {\n        // column =\u003e BigQuery type (e.g. STRING, INT64, FLOAT64, BOOL, TIMESTAMP, DATE)\n        return [\n            'id' =\u003e 'INT64',\n            'name' =\u003e 'STRING',\n            'created_at' =\u003e 'TIMESTAMP',\n        ];\n    }\n}\n```\n\nNotes:\n- Ensure the dataset exists in your BigQuery project. The table will be created or replaced automatically based on the schema you provide.\n- Configure `project_id`, `dataset_id`, and service account credentials in `config/excel-exporter.php`.\n\n### BigQuery layout guidance\n\nPrefer a single dataset with multiple tables per project. Each export class can target a different table via `googleBigQueryTableId()` while sharing the configured dataset.\n\n## Console commands\n\n- `excel-exporter:push` — interactively push one configured export (or via `--export=key`).\n- `excel-exporter:push-all` — push all configured exports.\n\n## Memory usage\n\nExcel exports can be memory intensive. You may set `memory_limit` in `config/excel-exporter.php` for the duration of the push.\n\n## Testing\n``` bash\n$ composer test\n```\n\n## Contributing\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security\nIf you discover any security related issues, please email michel@enflow.nl instead of using the issue tracker.\n\n## Credits\n- [Michel Bardelmeijer](https://github.com/mbardelmeijer)\n- [All Contributors](../../contributors)\n\n## About Enflow\nEnflow 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](https://enflow.nl/en).\n\n## License\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenflow%2Flaravel-excel-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenflow%2Flaravel-excel-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenflow%2Flaravel-excel-exporter/lists"}