soeurngsar/gutenberg

There is no license information available for the latest version (v1.0.0) of this package.

Content builder like wordpress Gutenberg by using Laraberg for laravel backpack

v1.0.0 2022-10-04 01:44 UTC

This package is auto-updated.

Last update: 2025-03-04 06:50:20 UTC


README

Gutenberg field for Laravel Backpack

Installation

  1. Install
composer require soeurngsar/gutenberg
  1. Publish views (optional)
php artisan vendor:publish --provider="SoeurngSar\Gutenberg\GutenbergServiceProvider"
  1. Publish laraberg resources
php artisan vendor:publish --provider="VanOns\Laraberg\LarabergServiceProvider"

Usage

On your CRUD Controller just change type to use gutenberg field

$this->crud->addField([
  'name' => 'content',
  'label' => trans('backpack::pagemanager.content'),
  'view_namespace' => 'gutenberg::fields', // this prop
  'type' => 'gutenberg', // this prop
  'placeholder' => trans('backpack::pagemanager.content_placeholder'),
]);

For other usage related Laraberg please follow their documentation

Update when you already published view (point 2 above)

When updating Gutenberg you have to publish the vendor files again by running this command:

php artisan vendor:publish --provider="SoeurngSar\Gutenberg\GutenbergServiceProvider" --tag=views --force

Credits

Compatibility

  • Tested with laravel 8.0 with Backpack version 4.0