1. Go to this page and download the library: Download awcodes/mason 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/ */
use Awcodes\Mason\Mason;
use Awcodes\Mason\Bricks\Section;
->schema([
Mason::make('content')
->bricks([
Section::make(),
])
// optional
->placeholder('Drag and drop bricks to get started...'),
])
use Awcodes\Mason\MasonEntry;
use Awcodes\Mason\Bricks\Section;
->schema([
MasonEntry::make('content')
->bricks([
Section::make(),
])
])
class BrickCollection
{
public static function make(): array
{
return [
NewsletterSignup::make(),
Section::make(),
Cards::make(),
SupportCenter::make(),
];
}
}
Mason::make('content')
->bricks(BrickCollection::make())
MasonEntry::make('content')
->bricks(BrickCollection::make())