1. Go to this page and download the library: Download mycm/easyadmin-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/ */
mycm / easyadmin-sdk example snippets
use EasyAdmin\annotation\ControllerAnnotation;
/**
* @ControllerAnnotation(title="商品管理", auth=true)
*/
class GoodsController
{
// ...
}
use EasyAdmin\annotation\NodeAnnotation;
/**
* @NodeAnnotation(title="商品列表")
*/
public function index()
{
// ...
}
use EasyAdmin\auth\Node;
$node = new Node(
$baseDir, // 控制器所在目录
$annotationCacheDir, // 注解缓存目录
'app\admin\controller' // 命名空间前缀
);
$nodeList = $node->getNodelist();