PHP code example of inlayphp / core

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

    

inlayphp / core example snippets


$context = new PluginContext($panel, new ExtensionRegistry(), new AssetRegistry(), new RenderHookRegistry());
$manager = new PluginManager('0.2.0', $context);
$manager->load([$plugin]);

$asset = Asset::script(
    id: 'acme:maps',
    source: '/vendor/acme/maps.js',
    lazy: true,
    attributes: ['defer' => true, 'nonce' => 'request-nonce'],
);

$context->assets()->register($asset, 'acme/maps');
$scripts = $context->assets()->all(Asset::SCRIPT);