PHPackages                             stacktrace/laravel-builder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. stacktrace/laravel-builder

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

stacktrace/laravel-builder
==========================

Builder.io integration for Laravel.

v0.3.1(6mo ago)260MITPHPPHP ^8.2

Since Mar 27Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/stacktracelabs/laravel-builder)[ Packagist](https://packagist.org/packages/stacktrace/laravel-builder)[ RSS](/packages/stacktrace-laravel-builder/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (9)Used By (0)

Laravel Builder.io
==================

[](#laravel-builderio)

Laravel package for Builder.io integration for rendering content on your own, instead of using Builder.io API and CDN.

While it is completely possible to leverage just Visual Editor of the Builder.io and render content without relying on Builder.io API, the functionality is limited. When using Builder.io API, they take care of targeting, localization and utilization of other features such as symbols, content data etc. When rendering content on your own, you have to take care of targeting, symbol resolution and content preparation for rendering.

This package helps a with retrieving content from Builder.io and storing it in the database for later rendering directly by just reading the database and not querying Builder.io API on each page render.

### Features

[](#features)

- store Builder.io content in the database
- automatically update database content as soon as something changes in Builder.io, utilizing Builder.io global webhooks
- download image and video assets to Laravel Storage without need to use CDN
- Symbol support when retrieving content

### Installation

[](#installation)

To install the package, just run:

```
composer require stacktrace/laravel-builder

```

After installing, configure following environment variables:

```
# The Builder.io Public API key, can be found in settings
BUILDER_PUBLIC_API_KEY=123
# The Builder.io Private API key, can be found in settings as well
BUILDER_PRIVATE_KEY=123
# Random string for protecting webhook calls
BUILDER_WEBHOOK_TOKEN=somerandomstring
```

Then on Builder.io side, you have to configure webhook. Open Space Settings and within Integrations section, click on "Edit" next to Global Webhooks. Register the following webhook:

```
URL: https://your-laravel-app.com/__builder_webhook__
Headers:
    Authorization: somerandomstring

```

Set the Authorization header value to the `BUILDER_WEBHOOK_TOKEN` env variable.

### Usage

[](#usage)

#### Rendering pages

[](#rendering-pages)

To render a page, first you have to prepare a controller. The package supports simple path targeting, so you can use single path target on your pages.

First, create controller for resolving content from current request:

```
