1. Go to this page and download the library: Download asgardcms/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/ */
// Modules/YourModule/Http/frontendRoutes.php
...
// middleware will be applied to this specific route
$router->get('your-url', 'YourController@method')
->middleware(\Modules\Block\Http\Middleware\RenderBlock::class);
...
// middleware will be applied to whole group
$router->group(['middleware' => \Modules\Block\Http\Middleware\RenderBlock::class], function(Router $router) {
$router->get('your-url', 'YourController@method');
...
});
...
php
{!! Block::get('block-name') !!}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.