Download the PHP package contentpulseio/laravel without Composer
On this page you can find all versions of the php package contentpulseio/laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download contentpulseio/laravel
More information about contentpulseio/laravel
Files in contentpulseio/laravel
Package laravel
Short Description Laravel integration for ContentPulse.io — webhook ingestion, local content storage, and rendering.
License MIT
Homepage https://github.com/contentpulseio/laravel
Informations about the package laravel
ContentPulse for Laravel
Laravel integration for ContentPulse.io. Receives content webhooks, stores a local copy of the published content, and renders it through your own layout. Once content is delivered, your app serves it from its own database with no runtime dependency on ContentPulse.
Requirements
- PHP
^8.2 - Laravel
^10 | ^11 | ^12
Installation
The package is published on Packagist,
so the command above works out of the box. contentpulse:install publishes the
config and migration; the service provider is auto-discovered.
If you install from a private fork instead of Packagist, add the repository to
your composer.json before requiring:
Set your credentials in .env:
How it works
- Register the webhook endpoint (
webhooks/contentpulse) in your ContentPulse dashboard. Incoming requests are verified againstCONTENTPULSE_WEBHOOK_SECRET. - On
content.*events the package fetches the item and upserts it into thecontentpulse_contentstable. - Published content is served from the local store via the bundled routes:
GET /resources— indexGET /resources/{slug}— single item
Set your layout so rendered content slots into your site chrome:
Webhooks
The package ships a ready-to-use webhook receiver — no controller or middleware to write in your app.
- Endpoint:
POST /webhooks/contentpulse(override withCONTENTPULSE_WEBHOOK_PATH). - Signature: every request is verified by the
VerifyContentPulseSignaturemiddleware. It computeshash_hmac('sha256', <raw request body>, CONTENTPULSE_WEBHOOK_SECRET)and compares it (constant-time) to theX-Webhook-Signatureheader.- Secret not set →
503 - Missing/invalid signature →
401 - Valid →
200 {"status":"ok"}
- Secret not set →
- Handled events (from the
eventfield orX-Webhook-Eventheader, withdata.content_idas the ContentPulse ULID):content.created,content.updated,content.published→ fetch the item from the API and upsert it intocontentpulse_contentscontent.deleted→ remove the local row
Register the endpoint in your ContentPulse dashboard (Webhooks) pointing at
https://your-app.test/webhooks/contentpulse, subscribe to the content.*
events, and set the signing secret to match CONTENTPULSE_WEBHOOK_SECRET.
Published content then syncs automatically; contentpulse:sync is only needed
for the initial backfill.
Local image downloads
When CONTENTPULSE_DOWNLOAD_IMAGES=true (default in the package config), synced
featured images and variants are fetched onto your filesystem disk and stored as
app-relative URLs (e.g. /storage/media/blog/{hash}.webp). Downloads reject
empty/HTML responses and only persist a relative URL after the file is verified
on disk; otherwise the upstream ContentPulse URL is kept.
If local files go missing (disk cleanup, failed deploy, etc.) while the database still points at relative URLs, repair them:
contentpulse:repair-images re-fetches each affected item from the API and
re-runs image localization.
Using your own design (decoupled read model)
Already have a blog with your own Post model, controller, views, and SEO?
Keep all of it. The package Content model is a plain, queryable Eloquent
model that exposes a post-like surface, so it drops into your existing views
with no trait, no base class, and no changes to your Post model.
Scopes
Post-like accessors (built in)
| Accessor | Returns |
|---|---|
title, excerpt, slug, featured_image |
columns |
content |
pre-rendered HTML (rendered_html) |
read_time |
minutes (from word_count) |
categories, tags |
Collection of {name, slug} objects |
meta_title, meta_description, meta_keywords |
SEO fields |
views, user |
0 / null (override in your view if needed) |
published_at |
Carbon |
Merge with your existing posts
Because the field surface matches a typical Post, you can render both
sources through the same Blade views:
Your views, your routes, your SEO tags — the package only supplies the data.
Or just echo the HTML
Customizing the design
The bundled Blade views are fully overridable. Publish them into your app to own the markup and styling:
This copies the views to resources/views/vendor/contentpulse/:
index.blade.php— list pageshow.blade.php— single itempartials/head.blade.php— SEO meta tags / JSON-LDpartials/styles.blade.php— base CSS
Laravel automatically loads the published copies instead of the package defaults, so edit them freely. Delete a file to fall back to the package version. Package updates never overwrite your published views.
Language switcher
The package includes a locale-aware dropdown for hosts that expose translated content. Pass a tag-to-URL map so only published variants are offered:
Labels are generated from BCP-47 tags, including regional variants, so adding a new ContentPulse language requires no application locale mapping.
Artisan
Backfills the local store from the API (useful for the initial import).
License
MIT
All versions of laravel with dependencies
contentpulse/contentpulse-php Version ^0.1
illuminate/console Version ^10.0|^11.0|^12.0|^13.0
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/routing Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
spatie/laravel-package-tools Version ^1.16