PHPackages                             binod/bootstrap-snippet - 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. binod/bootstrap-snippet

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

binod/bootstrap-snippet
=======================

A Laravel page builder with configurable Bootstrap 5 sections from LiveCanvas library

01PHP

Since Mar 12Pushed 3mo agoCompare

[ Source](https://github.com/unknownrocks619/bootstrap-snippet)[ Packagist](https://packagist.org/packages/binod/bootstrap-snippet)[ RSS](/packages/binod-bootstrap-snippet/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Bootstrap Snippet — Laravel Page Builder
========================================

[](#bootstrap-snippet--laravel-page-builder)

A drag-and-drop page builder for Laravel that lets you compose pages from reusable Bootstrap 5 sections. Built with a live field editor sidebar, image uploads, embed support, and a JSON-driven section library you can extend with your own custom sections.

---

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12
- Bootstrap 5 (loaded in your layout)

---

Installation
------------

[](#installation)

Install via Composer:

```
composer require binod/bootstrap-snippet
```

The package auto-discovers its service provider. No manual registration needed.

Run the migrations to create the builder tables:

```
php artisan migrate
```

Publish everything at once (config, assets, and section files):

```
php artisan vendor:publish --tag=bootstrap-snippet
```

Or publish only what you need:

```
# Config file → config/bootstrap-snippet.php
php artisan vendor:publish --tag=bootstrap-snippet-config

# Compiled CSS/JS → public/vendor/bootstrap-snippet/
php artisan vendor:publish --tag=bootstrap-snippet-assets

# Section JSON files → resources/bootstrap-snippet/sections/
php artisan vendor:publish --tag=bootstrap-snippet-sections
```

---

Usage
-----

[](#usage)

Open the builder in your browser:

```
http://your-app.test/snippet-builder

```

From the builder you can:

- **Create** a new page component and give it a name
- **Add sections** from the library (hero, features, CTA, testimonials, pricing, and more)
- **Edit field values** (text, textarea, image, URL, color, video embed) in the live sidebar
- **Reorder** sections by dragging them
- **Preview** the finished page
- **Publish** the component to make it visible to front-end visitors

To embed a built component anywhere in your Blade templates:

```
@include('bootstrap-snippet::render', ['slug' => 'your-page-slug'])
```

---

Configuration
-------------

[](#configuration)

After publishing, edit `config/bootstrap-snippet.php`:

```
return [
    // URL prefix for all builder routes (default: 'snippet-builder')
    'prefix' => 'snippet-builder',

    // Middleware stack for builder routes
    'middleware' => ['web'],

    // Storage disk and directory for uploaded images
    'upload_disk' => 'public',
    'upload_path' => 'snippet-uploads',

    // Database table prefix
    'table_prefix' => 'bsnippet_',

    // Auth: show draft components to logged-in users only
    'auth' => [
        'enabled' => false,
        'guard'   => 'web',
    ],

    // Defaults applied to new components
    'defaults' => [
        'layout_type' => 'container',   // container | container-fluid
        'status'      => 'draft',
    ],
];
```

---

Section Library
---------------

[](#section-library)

The package ships with a set of Bootstrap 5 sections across these categories:

- **Hero** — full-width and split hero banners
- **Features** — icon grids and feature lists
- **Content** — text + image rows, company intro blocks
- **CTA** — call-to-action banners
- **Testimonials** — quote cards and review grids
- **Pricing** — pricing table layouts
- **FAQ** — accordion FAQ blocks
- **Gallery** — image grid layouts
- **Contact** — contact form sections
- **Footer** — footer layouts

### Adding custom sections

[](#adding-custom-sections)

Publish the default section JSON files so you can extend them:

```
php artisan vendor:publish --tag=bootstrap-snippet-sections
```

Your customisable sections will be at `resources/bootstrap-snippet/sections/`. See [CREATING\_SECTIONS.md](CREATING_SECTIONS.md) for a full guide with field types, placeholder syntax, and a complete worked example.

---

Running Tests
-------------

[](#running-tests)

The test suite uses Laravel's built-in PHPUnit setup — no additional packages required.

```
# Run only the package tests
php artisan test --testsuite="Package Unit,Package Feature"

# Run everything
php artisan test
```

---

Field Types
-----------

[](#field-types)

Each editable field in a section template is backed by one of these types:

TypeEditor InputUse For`text`Single-line inputHeadings, short labels`textarea`Multi-line textareaParagraphs, long descriptions`url`URL inputLink `href` values`image`Upload + URL inputImage `src` attributes`color`Color pickerBackground and text colours`embed`URL inputYouTube / Vimeo embed URLs`repeater`Dynamic rowsLists, team members, pricing tiers---

License
-------

[](#license)

MIT — see [LICENSE](LICENSE) for details.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance54

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a91d963945390082921b9e78c5d6e51dbafa6cc7e981dfdd71fcd925b6f54205?d=identicon)[unknownrocks619](/maintainers/unknownrocks619)

---

Top Contributors

[![unknownrocks619](https://avatars.githubusercontent.com/u/8497513?v=4)](https://github.com/unknownrocks619 "unknownrocks619 (5 commits)")

### Embed Badge

![Health badge](/badges/binod-bootstrap-snippet/health.svg)

```
[![Health](https://phpackages.com/badges/binod-bootstrap-snippet/health.svg)](https://phpackages.com/packages/binod-bootstrap-snippet)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
