Download the PHP package stacktrace/laravel-builder without Composer

On this page you can find all versions of the php package stacktrace/laravel-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-builder

Laravel Builder.io

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

Installation

To install the package, just run:

After installing, configure following environment variables:

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:

Set the Authorization header value to the BUILDER_WEBHOOK_TOKEN env variable.

Usage

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:

Then in web.php register this controller as fallback controller, since we want to dynamically render page based on path targeting:

In the Builder.io, set targeting of your page to something like urlPath is /test. Provided that you do not have a route registered on the /test path, the fallback controller will engage, and Builder::resolvePageFromRequest will search for a page on /test path.

You can now render the content directly using Builder.io SDK like following:

Builder editor

To be able to edit pages, within Builder.io on your site, create separate controller for handling editor requests:

Register controller in web.php:

Then render editor content using Builder.io SDK:

Note that we now we are using fetchOneEntry to render content using Builder.io API. This is however necessary for editor to work.

Then in your model settings, use a dynamic editor URL. Enter the following URL:

The editor will now use your app instead of Builder.io preview page.

Localization

While localization is a premium feature in Builder.io, you can use simple field to store locale of your content. Just define a field in your model settings named locale. When receiving webhooks, the package looks for fields and if it finds a field named locale, it will store it in local column. The Builder::resolveEditorFromRequest will respect locale settings with following rules:


All versions of laravel-builder with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3
illuminate/contracts Version ^10.0|^11.0
illuminate/support Version ^10.0|^11.0
illuminate/database Version ^10.0|^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package stacktrace/laravel-builder contains the following files

Loading the files please wait ....