PHP code example of magna-cms / pages

1. Go to this page and download the library: Download magna-cms/pages 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/ */

    

magna-cms / pages example snippets


public function blocks(): array
{
    return [
        BlockDefinition::fromArray([
            'handle' => 'testimonial-wall',
            'label' => 'Testimonial wall',
            'icon' => 'blocks:grid',
            'category' => 'marketing',
            'fields' => [
                ['handle' => 'heading', 'type' => 'text', 'label' => 'Heading'],
                ['handle' => 'limit', 'type' => 'number', 'label' => 'How many', 'default' => 6],
            ],
        ]),
    ];
}
bash
composer magna:plugin:enable magna-cms/pages
php artisan migrate