插件传创建更
parent
1f672b4eba
commit
b413fcebb4
|
|
@ -601,30 +601,16 @@ $admin=<<<php
|
||||||
<?php
|
<?php
|
||||||
namespace app\plugins\\$plugins\admin;
|
namespace app\plugins\\$plugins\admin;
|
||||||
|
|
||||||
use app\BaseController;
|
// {$params['name']} - 后台管理
|
||||||
|
class Admin
|
||||||
/**
|
|
||||||
* {$params['name']} - 后台管理
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 0.0.1
|
|
||||||
* @datetime 2016-12-01T21:51:08+0800
|
|
||||||
*/
|
|
||||||
class Admin extends BaseController
|
|
||||||
{
|
{
|
||||||
// 构造方法
|
|
||||||
public function __construct(\$params = [])
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 后台管理入口
|
// 后台管理入口
|
||||||
public function index(\$params = [])
|
public function index(\$params = [])
|
||||||
{
|
{
|
||||||
// 数组组装
|
// 数组组装
|
||||||
\MyViewAssign('data', ['hello', 'world!']);
|
MyViewAssign('data', ['hello', 'world!']);
|
||||||
\MyViewAssign('msg', 'hello world! admin');
|
MyViewAssign('msg', 'hello world! admin');
|
||||||
return \MyView('../../../plugins/view/$plugins/admin/admin/index');
|
return MyView('../../../plugins/view/$plugins/admin/admin/index');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
@ -634,19 +620,11 @@ $hook=<<<php
|
||||||
<?php
|
<?php
|
||||||
namespace app\plugins\\$plugins;
|
namespace app\plugins\\$plugins;
|
||||||
|
|
||||||
use app\BaseController;
|
// {$params['name']} - 钩子入口
|
||||||
|
class Hook
|
||||||
/**
|
|
||||||
* {$params['name']} - 钩子入口
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 0.0.1
|
|
||||||
* @datetime 2016-12-01T21:51:08+0800
|
|
||||||
*/
|
|
||||||
class Hook extends BaseController
|
|
||||||
{
|
{
|
||||||
// 应用响应入口
|
// 应用响应入口
|
||||||
public function run(\$params = [])
|
public function handle(\$params = [])
|
||||||
{
|
{
|
||||||
// 是否控制器钩子
|
// 是否控制器钩子
|
||||||
// is_backend 当前为后端业务处理
|
// is_backend 当前为后端业务处理
|
||||||
|
|
@ -671,30 +649,16 @@ $index=<<<php
|
||||||
<?php
|
<?php
|
||||||
namespace app\plugins\\$plugins\index;
|
namespace app\plugins\\$plugins\index;
|
||||||
|
|
||||||
use app\BaseController;
|
// {$params['name']} - 前端独立页面入口
|
||||||
|
class Index
|
||||||
/**
|
|
||||||
* {$params['name']} - 前端独立页面入口
|
|
||||||
* @author Devil
|
|
||||||
* @blog http://gong.gg/
|
|
||||||
* @version 0.0.1
|
|
||||||
* @datetime 2016-12-01T21:51:08+0800
|
|
||||||
*/
|
|
||||||
class Index extends BaseController
|
|
||||||
{
|
{
|
||||||
// 构造方法
|
|
||||||
public function __construct(\$params = [])
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 前端页面入口
|
// 前端页面入口
|
||||||
public function index(\$params = [])
|
public function index(\$params = [])
|
||||||
{
|
{
|
||||||
// 数组组装
|
// 数组组装
|
||||||
\MyViewAssign('data', ['hello', 'world!']);
|
MyViewAssign('data', ['hello', 'world!']);
|
||||||
\MyViewAssign('msg', 'hello world! index');
|
MyViewAssign('msg', 'hello world! index');
|
||||||
return \MyView('../../../plugins/view/$plugins/index/index/index');
|
return MyView('../../../plugins/view/$plugins/index/index/index');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue