PHP code example of devfactory / block

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

    

devfactory / block example snippets


// config/app.php

'providers' => [
    ...
    Devfactory\Block\BlockServiceProvider::class,
],

'aliases' => [
    ...
    'Block' => Devfactory\Block\Facades\Block::class,
],

{{ Block::get('block_title') }}
bash
php artisan vendor:publish --provider="Devfactory\Block\BlockServiceProvider" --tag="config"
bash
php artisan vendor:publish --provider="Devfactory\Block\BlockServiceProvider" --tag="views"
bash
php artisan vendor:publish --provider="Devfactory\Block\BlockServiceProvider" --tag="migrations"