Those who are familiar with WordPress have probably heard of this new editor called Gutenberg. If you have no idea what I am talking about, don’t worry.

Gutenberg is the latest user friendly editor that everyone trying to integrate. It gives option to create custom blocks and various types of elements which make your content area more decent and professional.


About Laraberg :

This is where our Laravel plugin, Laraberg, comes in. It takes all the configuration you would have to do to get GutenbergJS running in your Laravel application, and puts it into an easy to install package. After installing you’re free to use to Gutenberg editor in any way you see fit, from entire pages for your website to small sections on your webshop’s product detail page.

What does Laraberg do :

The goal for Laraberg is to give developers the ability to add the Gutenberg editor to any page they like in a way that is as easy as possible, but at the same time it has to prove enough options to tailor the editor so it can fit into any Laravel project out there. To make this possible there were a few problems to solve.

Since GutenbergJS is ‘only’ a standalone version of Gutenberg, it does not implement any of the WordPress functionality that the editor needs. This means that Laraberg has to come with its own implementations for some of those.

  • API endpoints :

    Some of Gutenberg’s blocks are dynamic, those are the reusable blocks, and the embed blocks. For those blocks Laraberg provides API endpoints that retrieve the necessary data to render those blocks inside the editor. And, in the case of reusable blocks, Laraberg also provides the endpoints to create, update and delete those blocks.

  • Mock data :

    A lot of data that Gutenberg requests from WordPress is irrelevant for Laraberg, and because of that we can send standard mock data whenever the editor requests this information. This includes requests like the theme’s capabilities, the available taxonomies and the different post types.

  • Content rendering :

    When a page made with Gutenberg gets submitted, the resulting content is not always fully functional HTML. When a page has any dynamic blocks inside of it, there is some processing that has to be done before the content will show correctly.

Besides those points there were some more problems to solve, like replacing the WordPress media library, making Gutenberg’s content easily accessible and providing configuration options for the API endpoints.

Final Words :

If you would like to give Laraberg a try, the release is available on Github. If you want to Develop your own website in Laravel Framework, feel free to Contact us !!

Related Posts

Laravel Framework

October CMS : Best Choice for Laravel CMS

OctoberCMS is the free, efficient, and open-source content management system based on a PHP programming language called "Laravel". OctoberCMS makes the creation and optimisation of websites easy, with fast-paced applications and unique solutions for developers. Read more…

Laravel Framework

Integrate Laravel CMS for Development Process

To build web applications with desired functionalities, developers use different PHP frameworks. Each framework provides specific features that allows developers to build project functionalities easily. Laravel is one of the top PHP frameworks available to Read more…

Laravel Framework

Laravel 7 Released: New Features

Laravel 7 is now released and includes many new features including Laravel Airlock, better routing speed, custom Eloquent casts, Blade component tags, fluent string operations, a new HTTP client, CORS support, and many more features. Read more…