Download the PHP package adeguntoro/larabergcms without Composer

On this page you can find all versions of the php package adeguntoro/larabergcms. 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 larabergcms

LarabergCMS

Gutenberg-style content management for Laravel, built on top of van-ons/laraberg.

Install it in a fresh Laravel application and you get a working post CRUD with the WordPress Gutenberg block editor, category support and media upload — no extra wiring needed.

This package is a simplified and modified version of Laraberg for Laravel. I created it out of frustration with how much setup and configuration was needed to get Laraberg working the way I wanted. Instead of dealing with unnecessary complexity just to have a Gutenberg-style editor in a Laravel application, I wanted something that was easier to install, configure, and use. This package is my attempt to make that experience as simple and straightforward as possible.

Features

Requirements

Installation

Publish the van-ons/laraberg editor assets (the compiled laraberg.js / CSS used by every view):

Run the migrations:

Optional dummy categories for local testing (see Demo data):

Link storage for media uploads (when using the default public disk):

Publish the local Bootstrap/React/font assets and register them with Vite:

Then add the two files to the input array of your vite.config.js:

Finally build (or run the dev server) so the assets are compiled:

The package ships everything locally — Bootstrap 5.3.3, React 17 and the Playfair Display / Source Sans 3 fonts — so the CMS works with no CDN dependency.

Authentication

The CMS routes require login out of the box ('middleware' => ['web', 'auth']). You need a working login in your host app. Pick one of the two options below — Option A (Breeze) is the simplest; Option B (Jetstream) adds teams, 2FA and API tokens.

Option A — Laravel Breeze (simplest)

You now have /login and /register.

Option B — Laravel Jetstream

Jetstream supports: livewire, livewire --teams, inertia, inertia --teams — choose whichever fits.

Create a user (both options)

Neither Breeze nor Jetstream ships a user out of the box — you must register manually or seed one. Create a seeder:

database/seeders/UserSeeder.php:

Call it from DatabaseSeeder:

Then seed:

Log in at /login with [email protected] / password, then visit /laraberg.

For admin-only access, add an admin middleware/role and set 'middleware' => ['web', 'auth'] + your admin check in config/larabergcms.php (see Configuration below).

Usage

The routes are registered automatically. Visit /laraberg in your browser:

Render a post's block content in your own Blade file with the model's render() method:

Note: the laraberg.css stylesheet is what styles rendered blocks on the front-end — include it on every page that displays block content. No editor JavaScript is required for viewing; blocks are rendered server-side as plain HTML.

The model is accessible as LarabergCms\LarabergCms\Models\Laraberg:

Each post belongs to a category (larabergs.category_id, nullable). The relations and the category model:

Demo data

The package ships a CategorySeeder with dummy categories — handy while wiring the editor up locally, because it fills the category dropdown on the create/edit screens:

Seeding is idempotent: categories are matched on slug, so running it again updates the existing rows instead of creating duplicates. You can also call it from your own DatabaseSeeder:

Configuration

Copy the config file to customize route prefix, middleware and upload disk:

Available settings in config/larabergcms.php:

Key Default Description
prefix laraberg URL prefix for all CMS routes
middleware ['web', 'auth'] Middleware applied to CMS routes
disk public Storage disk for media uploads
max_upload_kb 51200 Max upload size in kilobytes (applied to both multipart and raw uploads)
enforce_allowed_extensions true When true, only allowed_extensions are accepted; when false, any extension is accepted
allowed_extensions see config Whitelist of acceptable file extensions

By default all routes require login (auth middleware). For admin-only access, replace auth with your own middleware:

To expose the CMS publicly (not recommended), remove auth:

Requirement: auth middleware assumes the host app has a login route. Without it, users hitting /laraberg are redirected to /login and get a 404. See the Authentication section to set up Breeze or Jetstream.

Security

Customizing the views

Publish the Blade views so you can change the markup or swap Bootstrap styling:

The views will be copied to resources/views/vendor/larabergcms/ and take precedence over the package's built-in views.

Careful when editing the script tags: keep laraberg.js as <script type="module"> and keep it after the @vite([...]) entry. The Vite bundle is what publishes window.React / window.ReactDOM, and module scripts run in document order — removing type="module" or moving the tag above the @vite line brings back Laraberg is not defined (see Troubleshooting).

Troubleshooting

Laraberg is not defined (browser console)

The editor itself (van-ons/laraberg) is served as a static file from public/vendor/laraberg/. If those assets were never published the <script> in the create/edit views 404s and the global Laraberg does not exist, so Laraberg.init(...) throws:

Check that https://your-app.test/vendor/laraberg/js/laraberg.js returns 200 and not 404.

Minified React error #227 / window.React is undefined

larabergcms.js bundles React 17 + ReactDOM 17 and publishes them as window.React / window.ReactDOM for van-ons/laraberg. If the published copy of that file (or public/build) is older than this package, the stale bundle keeps running the previous version. Re-publish the assets with --force and rebuild:

Remember to re-run npm run build (or npm run dev) whenever the published resources/vendor/larabergcms/* files change — Vite only serves what it has compiled.

Publishing to Packagist

  1. Create a repository on GitHub (e.g. adeguntoro/larabergcms) and push this package.
  2. Create a tag and push it: git tag v1.0.2 && git push origin v1.0.2 — bump the version for every release; Packagist picks new tags up automatically.
  3. On packagist.org, click Submit package, enter the GitHub URL and submit.
  4. Authenticate Packagist with the GitHub repo (Settings → Service Hooks / Webhooks) so new tags publish automatically.

Credits

Big thanks to the Van Ons team for creating and maintaining van-ons/laraberg — the WordPress Gutenberg editor running inside Laravel. This package is a thin CMS layer on top of their excellent work; all the block-editing magic belongs to them.

Also bundled locally (all MIT-licensed):

License

MIT


All versions of larabergcms with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0|^13.0
van-ons/laraberg Version ^2.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 adeguntoro/larabergcms contains the following files

Loading the files please wait ...