PHP code example of pvtl / voyager-page-blocks

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

    

pvtl / voyager-page-blocks example snippets


$blocks['company_overview'] = [
    'name' => 'Company Overview',
    'template' => 'voyager-page-blocks::blocks.company_overview',
    'fields' => [
        'content' => [
            'field' => 'content',
            'display_name' => 'Company Overview Content',
            'type' => 'rich_text_box',
            '

<div class="page-block">
    <div class="grid-container column text-center">
        {!! $blockData->content !!}
    </div>
</div>