1. Go to this page and download the library: Download selfreliance/adminamazing 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/ */
\Blocks::register('name', function(){
return 'test';
}); // with simple function
\Blocks::register('name', 'className@nameFunction'); // with function from controller/class
'blocks' => [
...
'nameBlock:directory',
]
\Blocks::get('name'); // get block by name
\Blocks::all(); // get all blocks