# PublishFlow Laravel Receiver Kit

This kit installs a small protected Laravel receiver endpoint so PublishFlow can send articles, devotions, news posts, or custom content to a Laravel site.

## Endpoint

POST /api/publishflow/v1/posts
Header: X-PublishFlow-Token: customer-private-token

## Files in this kit

- routes-api-publishflow-receiver.php
- PublishFlowReceiverController.php
- env-example.txt
- payload-mapping.md

## Install steps

1. Copy the route from routes-api-publishflow-receiver.php into the customer Laravel app routes/api.php.
2. Copy PublishFlowReceiverController.php into app/Http/Controllers/PublishFlowReceiverController.php.
3. Add PUBLISHFLOW_API_TOKEN=replace-with-a-long-random-private-token to the Laravel .env file.
4. Run php artisan config:clear and php artisan route:clear if the site uses cached config.
5. In PublishFlow, open Connected Publishing Sites > Laravel Sites and save the endpoint/token.
6. Click Test before sending live content.

## Security

Do not expose the token publicly. Every customer Laravel site should use its own unique token.
This generic kit does not include any customer-specific token, database credential, BibleCombo setting, or BibleAlert setting.
