PHP code example of magna-cms / plugin-sdk
1. Go to this page and download the library: Download magna-cms/plugin-sdk 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/ */
magna-cms / plugin-sdk example snippets
use Magna\Plugins\Plugin;
use Magna\Contracts\RegistersDashboardWidgets;
class HelloPlugin extends Plugin implements RegistersDashboardWidgets
{
public function boot(): void
{
// load routes, views, listeners…
}
public function dashboardWidgets(): array
{
return [\Acme\Hello\Widgets\HelloWidget::class];
}
}