1. Go to this page and download the library: Download inrage/blocks library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
inrage / blocks example snippets
namespace App\Blocks;
use inRage\Blocks\Block;
use WordPlate\Acf\Fields\Text;
class Testing extends Block
{
public $title = 'Testing';
public $description = 'Testing block';
public $icon = 'format-image';
protected function fields(): array
{
return [
Text::make('Text', 'text')->
namespace App\Fields;
use inRage\Blocks\Field;
use WordPlate\Acf\Fields\Text;
use WordPlate\Acf\Location;
class FrontpageFields extends Field
{
public $title = 'Homepage management';
protected function fields(): array
{
return [
Text::make('title')->